Questions tagged [prefix-keys]
61 questions
15
votes
9 answers
What packages are available for modal editing?
What packages are available for modal editing in Emacs? What do you use and why?
Let's try to post one package per answer. I propose mention advantages and
shortcomings of every package.
Here is my definition of modal editing (I couldn't find…

Mark Karpov
- 4,893
- 1
- 24
- 53
8
votes
1 answer
What does `(fset SYMBOL KEYMAP)` do?
I was reading through the projectile source file and they do the following:
(defvar projectile-command-map
(let ((map (make-sparse-keymap)))
; define-keys
map)
"Keymap for Projectile commands after `projectile-keymap-prefix'.")
(fset…

Czipperz
- 317
- 2
- 9
8
votes
3 answers
Why I can't bind Shift-?
My system is debian wheezy, I tried to do the following
(global-set-key (kbd "S-") 'evil-shift-left-line)
(global-set-key (kbd "") 'evil-shift-left-line)
(define-key global-map [S-backspace] 'evil-shift-left-line)
What I…

godblessfq
- 1,177
- 8
- 21
8
votes
1 answer
How can I globally replace C-c with another key binding?
The key combination C-c is not convenient to type in the keyboard layout I use, and I'm trying to do change it globally. The goal is to replace every occurrence of C-c with another binding d, such that sending a message in Gnus would be…

brab
- 925
- 1
- 7
- 8
7
votes
3 answers
how to add a prefix key to all keybindings of a specific mode?
i am using a mode, but am not used to its key-bindings: some of them conflict to the emacs global ones. so, i want to add a prefix key-binding to all its existing keybindings.
for example, if my-mode defines key-binding M-] for my-mode-shot, i am…

象嘉道
- 191
- 5
6
votes
2 answers
When does Emacs treat keymaps as functions?
Emacs' source code contains multiple instances of using fset with a keymap.
For example, in ediff-util.el:
;; Allow ediff-mode-map to be referenced indirectly
(fset 'ediff-mode-map ediff-mode-map)
Or in esh-mode.el:
(fset eshell-command-prefix…

Wilfred Hughes
- 6,890
- 2
- 29
- 59
6
votes
2 answers
Find out the purpose of a Prefix Command listed in describe-bindings
Is there any easy way to determine the purpose of a prefix key shown in
the output of (describe-key Chk?
I walked through my (kbd "C-x ") and (kbd "C-x C-") combinations
to find out what they are all bound to.
The method worked fine,…

Kevin
- 1,308
- 8
- 20
5
votes
3 answers
Undefine prefix binding
I've become accustomed to using C-x p for switching to the previous window.
And, I recently had to start including a company-wide startup.el file that defines the prefix C-x p-. I don't use any of the C-x p- shortcuts.
Is there a way that I can…

Kennet Belenky
- 211
- 1
- 4
5
votes
1 answer
C-) not recognized on Windows 10
In my init file, I have C-) bound to a smartparens "slurp" command. This works great on linux, but when I try to use the same keybinding on my Windows machine, nothing happens.
To troubleshoot on my Windows machine, I've tried C-h c followed by…

achalk
- 579
- 4
- 16
5
votes
3 answers
Displaying bindings for prefix keymaps
I have a tree of deeply nested keymaps, with many possible leaves (commands), too many for a human to remember. For simplicity, let's say each command is associated with a given file name.
I would like to display a help tool-tip as the user is…

erjoalgo
- 853
- 1
- 5
- 18
4
votes
2 answers
How do I add a keybinding to use during an interactive isearch, `C-s ...`
Can I assign a key binding starting with C-s such as:
(global-set-key (kbd "C-s C-w") 'isearch-forward-symbol-at-point)
but I want to keep (kbd "C-s") for i-search.
I am having following error:
error: Key sequence C-s C-w starts with non-prefix…

alper
- 1,238
- 11
- 30
4
votes
1 answer
Proper way to change prefix key for minor-mode map?
The package HideShow (hs-minor-mode) defines some key bindings with prefix key C-c @.
What is the proper way to change this prefix key to C-c h?
The new key binding should also replace the old key bindings in the menu bar items of Hide/Show…

jue
- 4,476
- 8
- 20
4
votes
0 answers
Can the prefix of a key-sequence have an effect?
I am writing a small window navigation and manipulation package. Windows are numbered very much like WindowNumberingMode.
To make this concrete I have a series of commands:
"C-, 1" ; Move focus to (select) window #1
.. ; ..
"C-, 9" ;…

John Yates
- 201
- 1
- 5
3
votes
1 answer
What is the difference between C-x and C-c and the concept behind it?
I was asking a similar question about the main concept behind default emacs key bindings. But this one is more specific to C-c and C-x.
I know and use some commands/functions/features bind to C-c or C-x by default. I also have my own cheat sheet for…

buhtz
- 679
- 4
- 22
3
votes
1 answer
Dead keys suddenly not working in Emacs
I'm using the emacs package on debian 10 and the dead keys for typing accents on characters (for instance, á) are no longer working. WHen I type the dead key, some kind of tiny window or artifact gets displayed, and then when I type the character…

korppu73
- 135
- 3