I'm on Prelude, and there is no way I can type a \
. I was thinking maybe I should create a keybinding but I don't know how to create it to output a character such as \
. Any help welcome! Thank you!
Asked
Active
Viewed 1,300 times
0

NickD
- 27,023
- 3
- 23
- 42

Emmanuel Goldstein
- 934
- 6
- 18
-
1What does `C-h k \ ` tell you? – phils May 05 '20 at 13:31
-
1What is Prelude? Why is there no way to type a `\\`? Do not expect other people to know what you are talking about just because you can see it: please explain. – NickD May 05 '20 at 13:49
-
Do you see the same thing when you start Emacs using `emacs -Q` (no init file)? If not, bisect your init file to find the culprit. – Drew May 05 '20 at 18:20
2 Answers
1
Emacs by default doesn't associate \
with any command… You should be able to directly type it without any trouble. If you cannot, then you should have a module enabled, which takes it.
If you need further help, please answer the following questions:
- are you using emacs in terminal (in a TTY?) or in graphical mode?
- where do you want to type a backslash? In a document body, in the minibuffer, elsewhere?
- as @phils asks, what does
C-h k \
give you? - what is your keyboard layout?

Étienne
- 93
- 5
-
To be more precise, most keys are bound to `self-insert-command`, which is the command that inserts the key you pressed into the buffer. – db48x May 05 '20 at 23:00
-
Apologies. I managed to find the keyboard binding for that \. Apparently I needed the RIGHT Alt key, not the left one (even though in the Mac Kayboard layout both are giving the backslash). When I type C-h k \ I get "\ runs the command org-self-insert-command (found in org-mode-map), which is an interactive compiled Lisp function in ‘org-9.3.6/org.el’. It is bound to SPC..~, ..\377. (org-self-insert-command N). " – Emmanuel Goldstein May 06 '20 at 18:22
0
As a work-around you can try C-q \
. Try Étienne Deparis answer for a permanent resolution.

hopeless loser
- 65
- 4
-
-
-
I resolved this issue. My keyboard produces it outside Emacs when pressing SHIFT+ALT(left or right)+7. I always use ALT(left). Since it did not work in Emacs, I thought something was wrong. Apparently some other keybinding is associated with that combo, but using ALT(right) works. – Emmanuel Goldstein May 08 '20 at 03:30
-