Newest Questions

15 votes
2 answers
5k views

Safe way to `enable-local-variables`?

I inherited my .emacs file from a friend about 18 years ago. Buried in the middle is the following ominous comment warning about the security implications of the enable-local-variables feature: ;; ...
Wandering Logic's user avatar
46 votes
7 answers
5k views

How can I use my local Emacs client as the $EDITOR for remote machines I access over TRAMP?

I often use TRAMP to manage several remote servers, both for editing files and running remote shells in shell-mode. However, this does not work when a command uses the EDITOR variable to edit a file, ...
Tikhon Jelvis's user avatar
14 votes
2 answers
5k views

Using daemon mode in Gnome 3

I've gotten the Emacs daemon to work through the command line using the EmacsWiki page, but I'm stuck on how to get the client to run through the Gnome 3 launcher. How can I set up a Gnome desktop ...
tbekolay's user avatar
  • 243
48 votes
5 answers
17k views

Re-open *scratch* buffer

If I accidentally closed the scratch buffer in Emacs, how do I create a new scratch buffer?
programking's user avatar
  • 7,474
24 votes
6 answers
8k views

How to delete the first few n chars of every line?

I recently asked: How to add a prefix to every line? So go from the code below: I said Hello I said There I said I am some code To code like: Hello There I am some code Now, how do I delete n ...
programking's user avatar
  • 7,474
19 votes
2 answers
937 views

How to scroll through all available matching interactive (M-x) commands using Helm rather than just my history?

I'm using Helm to perform completions for my interactive commands, but it only lets me cycle through those commands which I have used in the past (i.e. 4 Candidate(s)). I don't want this behavior, ...
wdkrnls's user avatar
  • 3,777
5 votes
1 answer
279 views

M-x sometimes doesn't show me the right options (smex?)

This is most likely a problem with a plugin (caching options, using LRU, etc?), but I'm not good enough to really troubleshoot it. My complete dotfiles (not very extensive) can be found here I use ...
Trevoke's user avatar
  • 2,467
29 votes
2 answers
4k views

How to clear a cell in an org-mode table?

Is there a built-in command to delete the contents of a cell in a single keystroke within an org-mode table? Note, I don't want to delete the row, just the cell contents. | some text | ==> | ...
wdkrnls's user avatar
  • 3,777
46 votes
7 answers
11k views

How to add a prefix to every line?

I have the code below: Hello There I am some code And want to add code in front of it, like: I said Hello I said There I said I am some code So how would I add a prefix to each line?
programking's user avatar
  • 7,474
5 votes
3 answers
11k views

Search for text and navigate between the occurrences

I want to be able to search for some text and navigate quickly between the occurrences. What is a convenient way to search for some text, view all the occurrences, and jump quickly to the next/...
programking's user avatar
  • 7,474
8 votes
4 answers
1k views

Fastest way to move code block to specific line

Say you have code on lines 4, 5, 6. Then you want to move this block of code to starting point line 9 while also deleting lines 4, 5, 6. What's the fastest way, i.e. least amount of key strokes, to ...
c-o-d's user avatar
  • 940
28 votes
5 answers
2k views

Different indentation styles for different projects

I work on many different C projects with unique indentation styles. How do I get Emacs to do per-project indentation settings without polluting the upstream project trees with .dir-locals.el files? I ...
artagnon's user avatar
  • 2,287
124 votes
6 answers
24k views

Are there any advantages to using ~/.emacs.d/init.el instead of ~/.emacs?

I've normally used ~/.emacs for my config file, but I've noticed others using ~/.emacs.d/init.el. Are there advantages to the init.el location? Any disadvantages?
Larry Coleman's user avatar

15 30 50 per page
1
1856 1857 1858 1859
1860