Most Popular
1500 questions
10
votes
1 answer
Why emacsclient say to quit with C-x 5 0?
As soon as I open emacsclient I found the following message in the minibuffer: When done with this frame, type C-x 5 0, I find it strange that it advices how to close the frame with delete-frame, any reason to display the message or prefer it over…

marcanuy
- 798
- 6
- 20
10
votes
2 answers
Why don't major modes just inspect the faces?
When writing a major mode, it's often useful to know 'is point in a string?' 'is point in a comment?'.
Most major modes seem to attempt to parse the programming language. For example:
python-syntax-content calls syntax-ppss
haskell-fill-paragraph…

Wilfred Hughes
- 6,890
- 2
- 29
- 59
10
votes
1 answer
How can the list of projects used by Projectile be manually updated?
I use the command locate --regex '/.git$' | grep username to get a list of all the Git repositories under my $HOME folder.
Is there a way to load them all into Projectile, to make them all instantly available?

vfclists
- 1,347
- 1
- 11
- 28
10
votes
4 answers
How to resume an INCOMPLETE keyboard macro recording?
Classic use-case:
You start recording a macro: C-x (
You do some stuff, let's say hello.
You run a command that throws an error, let's say C-g (e.g. you mistakenly run C-s and you have to cancel that with C-g, now your work is lost).
Now your…

Christopher Done
- 278
- 1
- 6
10
votes
2 answers
Config, examples and use cases of Library Of Babel
I want to understand how org-babel's Library Of Babel works. Seems like a powerful yet underused tool.
The documentation says that I can
add code to the library, by first saving the code in regular ‘src’ code blocks of an Org file, and then load…

Daniel
- 3,563
- 16
- 41
10
votes
2 answers
How to make undo-tree linear -- undo-tree-undo/redo
When running the command undo-tree-undo/redo successively, things are undone/redone based upon the current active branch. Although the user receives a branch point message along the way, the previous branches are ignored unless a user manually…

lawlist
- 18,826
- 5
- 37
- 118
10
votes
2 answers
How should I get the filename of the original buffer in an indirect cloned buffer?
I wanted to look at different portions of a buffer in two different frames, as I have two monitors of different shapes that I can't easily span a single frame over. Some googling led me to use clone-indirect-buffer, which works nicely.
However,…

rneatherway
- 483
- 3
- 11
10
votes
1 answer
how to make emacs prompt me before closing the last emacs gui frame when running emacs as a daemon?
I know that if I set:
(setq confirm-kill-emacs 'y-or-n-p)
Emacs prompts me before I kill it.
But I want emacs to prompt me before I close my last gui frame (prompting me before killing any frame would be very helpful already). When you run
emacs…

ninrod
- 1,436
- 2
- 13
- 28
10
votes
1 answer
How to know if emacs is running as a daemon?
I want to know if emacs is running as a daemon, so I can load some parts of my configuration according, I want to know this from within emacs.

shackra
- 2,702
- 18
- 47
10
votes
3 answers
Using constants inline
How to do the following in org-mode:
define a constant in the beginning of file, and
than use it in the text or even compute on it.
Following methods didn't work for me:
Method 1:
#+CONSTANTS: t=10
The temperature is `$t`, and twice of that is…

Shambho
- 457
- 3
- 13
10
votes
2 answers
How to display overlay like this screencast?
How to make an overlay in Emacs like the following (maybe it's not overlay, I don't know, it's from company-coq inline-docs):

stardiviner
- 1,888
- 26
- 45
10
votes
3 answers
Emacsclient: One single emacs process all the time from start up & never close & better hide GUI
Since emacsclient can handle long package loading time proerly, I really want to keep at least one emacs process, and most of the time only one emacs process, open as a background process and better hide GUI.
Right now I defined the following…

phonycollectibles
- 614
- 5
- 13
10
votes
1 answer
How to customize syntax highlight for just a given mode
I would like to change the syntax highlighting in my lua-mode.el without affecting other major modes.
Just as an example, I would like "key words" like if, then, else to be in bold and blue typeface when in lua-mode (instead of the default pink)…

Pier Paolo
- 275
- 3
- 10
10
votes
1 answer
How to get keystrokes displayed in the echo area immediately?
How do I get keystrokes displayed in the echo area immediately?
For example: when I enter the key sequence C-u j, it will not display in the echo area immediately, but then I press key k, and I discover that I was making a typo beforehand. So, I…

jimmy
- 103
- 5
10
votes
4 answers
Change permission of file
I use GNU Emacs 24.3.1 and want to create a new buffer and execute that directly without using terminal and chmod. Is there a way to change the permission of a saved buffer (file) directly from emacs?

hasanghaforian
- 215
- 4
- 11