Most Popular
1500 questions
10
votes
2 answers
Run ssh-add from Emacs and enter a passphrase
I want to call the ssh-add shell command.
So I invoke M-x shell-command RET, and
in the minibuffer, I type: ssh-add .ssh/id_rsa
The only thing I get is:
ssh_askpass: exec(/usr/bin/ssh-askpass): No such file or directory^M
How can I make Emacs give…

Nsukami _
- 6,521
- 2
- 23
- 35
10
votes
3 answers
Can I change the background color of the inactive minibuffer?
I tried it with the following settings:
(add-hook 'minibuffer-setup-hook
(lambda ()
(make-local-variable 'face-remapping-alist)
(add-to-list 'face-remapping-alist '(default (:background "green")))))
(set-face-background…

Lenar Hoyt
- 1,173
- 7
- 25
10
votes
1 answer
Speed up TeX-insert-macro on \input
In latex-mode when I use TeX-insert-macro to type a \input{...}
macro, Auctex conveniently offers filename completion, which is great.
However, it seems to search a lot of places to compile the completion
list, because emacs hangs for almost a…

Malabarba
- 23,148
- 6
- 79
- 164
10
votes
2 answers
cl-destructuring-bind on partial plist?
This causes an error
(cl-destructuring-bind
(&key a b)
'(:a "foo" :b 13 :c "bar")
(list a b))
because the :c key/value is not handled in the pattern match.
Often I find myself wanting to extract some subset of keys/values from a…

fommil
- 1,780
- 11
- 25
10
votes
2 answers
Shift+arrow to change window does not work in org-mode
I installed a package that changes emacs windows using Shift+arrow, and it works in various modes I use but not in org-mode. Is there a reason why org-mode shadows this command?

Alejandro Erickson
- 706
- 6
- 17
10
votes
1 answer
How can I save UTF-8 files with a Byte Order Mark?
I am trying to configure Emacs to save UTF-8 files with a Byte Order Mark. (Yes, I know that the BOM is evil and unnecessary for UTF-8 files. However, Microsoft has decided they know better, so I want to make sure I'm able to save files with…

Scott Weldon
- 2,695
- 1
- 18
- 31
10
votes
2 answers
Automatically switch focus to new window
Is there a way to automatically switch focus to any new windows?
For example, if I C-h f some-function, that creates a new window. But the focus remains where I was, so when I'm done reading and hit q, I just type a q in whatever buffer I was in…

Alex
- 1,038
- 5
- 20
10
votes
2 answers
How to get property values from org file headers
Is it possible to get property values from org file headers? For example, I have a file named something.org with following content:
#+TITLE: Awesome File
#+AUTHOR: My Name
#+XYZ: xyz
/content/
How could one get title or XYZ? I want to get those…

d12frosted
- 384
- 3
- 11
10
votes
3 answers
Highlighting upcoming dates in org mode agenda
I have entries in my org file similar to:
* Birthdays
:PROPERTIES:
:CATEGORY: birthday
:END:
%%(org-anniversary 1981 1 2) Harry (%d)
What I would like is for these to appear in the agenda (say) 2 weeks before they're due, similar to how a deadline…

Dave F
- 573
- 2
- 14
10
votes
3 answers
How to persistently move the cursor in a buffer other than the current one?
NB: The post How to move point to the end of another buffer, using `with-current-buffer` and `goto-char`? presumably asks the same question as this one, but the answers given to it do not readily apply to my case here. E.g. those answers involve…

kjo
- 3,247
- 17
- 48
10
votes
2 answers
In Org-Mode, is there a way to narrow the buffer to just the text under a heading?
For example, say I have a buffer that looks like this:
* Org-Mode
This is a document written in Org-Mode
** This is a subheading below that
Would it be possible to narrow the buffer to just "This is a document written in Org-Mode" and continue on…

Bob
- 173
- 1
- 7
10
votes
1 answer
Prevent inserting text at the beginning of a buffer that starts with read-only text
I'm extending an existing Emacs package and I want to make a part of the buffer not editable (read only). In fact, I want to make only one line in the middle of the buffer editable and I use the following snippet for achieving…

Andrii Tykhonov
- 452
- 2
- 13
10
votes
2 answers
How can I make Dired buffer names include the full path?
I often have many dired buffers open, including some for folders that have identical names. Occasionally, this causes me to switch to the wrong one, so I am looking for a way to fix this.
Currently, if I have multiple identically-named folders open…

Scott Weldon
- 2,695
- 1
- 18
- 31
10
votes
3 answers
Is there a way to show/open a file from a URI/URL
Is there some way to download and show a file from a URI/URL?
I now I can use wget and then open the downloaded file and I guess I could even try to write myself a small function to do this.
But most likely someone did before me so is there a…

Random Dev
- 203
- 3
- 7
10
votes
2 answers
Does word syntax take script into account?
I call count-words-region (M-x =) on US/RU/IPA string:
HelloПривheləʊ
The following message is printed:
Region has 1 line, 4 words, and 14 characters.
All symbols have w syntax, but differ in script:
(char-syntax ?H) ; ?w
(char-syntax ?П) ;…

gavenkoa
- 3,452
- 20
- 37