Most Popular
1500 questions
11
votes
2 answers
Prevent mouse click in inactive frames from reposistioning point
I want to prevent the "first" click on a frame in an inactive X window from having any effect, other than to make the frame active. Specifically, I don't want it to reposition point.
The problem is that I can't seem to detect that he frame was…

edam
- 311
- 1
- 6
11
votes
1 answer
`looking-back` performance
I have some code using (looking-back … (line-beginning-position)). Doc string of looking-back states that it's better to avoid this function because of slowness. I'm curious will following approach be faster?
(save-excursion
(goto-char…

Geradlus_RU
- 625
- 7
- 17
11
votes
1 answer
Magit custom commands
Magit displays the progression of multi-step commands with popup windows. For example, pressing c brings up the commit menu, whence pressing a will invoke magit-commit-amend.
I would like to include my own command magit-commit-snapshot, and invoke…

Matthew Piziak
- 5,958
- 3
- 29
- 77
11
votes
3 answers
With org-babel, how to name the results of a function call and reuse them
In org-mode, I am trying to define a function, a variable, and then assigning to another variable the result of the function call on the first variable. However, then it seems that I cannot use this new variable in subsequent functions…

T. Verron
- 4,233
- 1
- 22
- 55
11
votes
0 answers
How to immediately resize the minibuffer window?
Suppose that I have this function, that inserts some stuff into the minibuffer:
(defun foobar ()
(interactive)
(minibuffer-with-setup-hook
(lambda ()
(let ((resize-mini-windows t))
(save-excursion
(insert…

abo-abo
- 13,943
- 1
- 29
- 43
11
votes
2 answers
High CPU/memory usage and abnormally large savehist file?
I'm starting to use Spacemacs and occasionally I get stuck with Emacs beginning to require infinite amount of CPU and memory. Inspecting my .emacs.d/.cache folder reveals that the file savehist is 1.16 GB large... Deleting this file made Emacs work…

xji
- 2,545
- 17
- 36
11
votes
2 answers
How to use while-no-input?
From the docstring:
Execute BODY only as long as there's no pending input.
If input arrives, that ends the execution of BODY,
and while-no-input returns t. Quitting makes it return nil.
If BODY finishes, while-no-input returns whatever value…

Malabarba
- 22,878
- 6
- 78
- 163
11
votes
1 answer
How do I set up key bindings for modes in a specific Evil state?
I have a set of key bindings that I use for both web-mode and php-mode in insert mode (of Evil). So I cannot use set-local-map or something. Because in normal mode, the same keys will then call other commands. So the bindings need to be active in…

ReneFroger
- 3,855
- 22
- 63
11
votes
6 answers
Recursive grep in directory with helm and/or projectile?
A recursive grep in a directory should be the simplest thing, but I haven't found the recipe to get it to work yet. I'm juggling between the following commands and am not sure which has the functionality buried within it:
helm-find-files: The…

djechlin
- 923
- 8
- 21
11
votes
2 answers
RefTex searching for multiple articles with Helm
I recently started using Helm and am really enjoying it. However, I use emacs to write a lot of LaTeX. When I cite articles, I often need to cite several in the same cite macro - I could search my bibliography file for two separate entries very…

user2178117
- 133
- 8
11
votes
1 answer
why doesn't emacs support key up/down events
AFAIK emacs does not support keyup/keydown events, only keypressed. An example of a consequence is that when we want to mark a region we have to first set a mark set-mark-command and can then mark the region by moving around the point. While this is…

shaft
- 213
- 1
- 4
11
votes
3 answers
hl-line-mode hide background, how to avoid this?
With:
(when window-system
(set-face-background 'hl-line "light yellow")
(global-hl-line-mode 1))
current line highlighted by yellow background, but if text has background properties it also overwritten (like diff-mode, rainbow-mode).
Is it…

gavenkoa
- 3,352
- 19
- 36
11
votes
3 answers
How can I answer a minibuffer prompt from elisp?
I occasionally find myself using interactive functions inside of a function that I'm writing for my own use. If a function asks for some information (e.g. "Output file: ~/") is there a general elisp way to add text to the minibuffer and then press…

Seth Rothschild
- 380
- 1
- 11
11
votes
3 answers
String equality, ignore case?
Q: how does one test string equality but ignore case?
I've got a situation in which I'd like to compare strings but ignore case. Case is significant for string-equal, and apparently is insensitive to case-fold-search:
(string-equal "string"…

Dan
- 32,584
- 6
- 98
- 168
11
votes
1 answer
How to bind C-[ for real (seriously for real this time)
Is there any way to bind C-[ to something and not have all M- (Meta) bindings messed up?
Not the first time this question comes up. Unfortunately, the only solution offered in the previous thread is a) Linux specific, b) requires an external tool…

zeRusski
- 335
- 1
- 8