Newest Questions
27,898 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:
;; ...
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, ...
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 ...
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?
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 ...
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, ...
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 ...
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 | ==> | ...
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?
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/...
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 ...
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 ...
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?