Questions tagged [escape]
24 questions
9
votes
4 answers
Showing bytes as hexadecimal escapes rather than octal escapes
Short version: Can I make Emacs show \ff or \xff instead of \377?
Long version: Suppose you open a file that is not entirely text and has some binary data (say a PostScript or PDF file). For example, suppose you open GNU Emacs Reference Card…

ShreevatsaR
- 880
- 6
- 19
6
votes
2 answers
ANSI / xterm font-locking
I have a buffer with terminal escape codes in it and I want them to be colored:
I was able to do this with (ansi-color-apply-on-region (point-min) (point-max)):
However, my file is really big and that command is really slow. Is there any mode…

Jackson
- 1,218
- 9
- 19
3
votes
2 answers
Binding to have functionality
I'm not a fan of hitting escape 3 times so I am trying to have the same functionality with two key presses.
I have tried the following:
(define-key key-translation-map (kbd " ") 'keyboard-escape-quit)
This doesn't work and it actually…

sp00kyb00g13
- 149
- 2
- 8
2
votes
3 answers
What does "^[" represent?
I wrote a terminal output to a plain text file and opened it in Emacs, and I see "^[" here and there. I'd like to change it to tabs in terminal before writing its output to the file, but I don't know how to refer to them. What does "^["…

stacko
- 1,577
- 1
- 11
- 18
1
vote
0 answers
print hex-code in string
I hope "*ielm*"/eval-print-last-sexp print "\x80", but the result is
ELISP> "\x80"
"\200" ; Unicode characters should be displayed normally.
My current settings:
(setq print-escape-newlines t
print-escape-control-characters nil
…

shynur
- 4,065
- 1
- 3
- 23
1
vote
2 answers
How to prevent the character `^[(B` from being displayed on the compilation buffer
When I run the test feature of Rust in Emacs compilation mode, with ansi-color mode loaded, somehow the character ^[(B is always displayed like below:
It looks quite annoying.
Does anyone know how to remove these characters from the compilation…

Trung Ta
- 301
- 1
- 11
1
vote
1 answer
Org mode: How to escape the # character in a table formula
I am trying to rename a row inside a table using a formula in Org mode (don't ask why I'm doing this, I need to do it that way) but I'd like to call this row #. I'm doing this:
| #ERROR | B | C |
|--------+---+---|
| 1 | 2 | 3 |
| 1 | 2 |…

Nicryc
- 147
- 4
1
vote
1 answer
Which keymap variable contains the bindings for `M-x`?
The Help for key M-x key says
M-x runs the command execute-extended-command (found in global-map),
which is an interactive compiled Lisp function.
It is bound to ,

john323423
- 33
- 3
1
vote
0 answers
emacs -nw & gnome-terminal or xterm: can't distinguish C-M-v and C-M-S-v
emacs (v.26.3) can distinguish, out of the box, C-M-v (scroll-other-window) and C-M-S-v (scroll-other-window-down).
On the other hand, emacs -nw, when run in either gnome-terminal, mate-terminal or xterm, translates C-M-S-v to C-M-v, even when I…

Diagon
- 133
- 6
1
vote
0 answers
(org-mode) failing on Windows install
I've just installed Emacs 26.2 on a Windows 7 machine. This is a clean install, with no previous version of Emacs installed. Editing an Org file, I want to insert a new TODO item using "M-S-return". Typing that key sequence results in an error…

J. Dane
- 11
- 2
1
vote
1 answer
"ESC" no longer works as meta; how can I restore functionality?
I mistyped some command sequence and ESC stopped working as a meta prefix in Aquamacs (it still functions as usual in the command-line emacs, including both Apple's system version and the command-line version that comes with Aquamacs). Afterwards,…

outis
- 178
- 8
1
vote
1 answer
Produce \' in a string replacement
As you know, functions such as replace-regexp-in-string and replace-match have an argument LITERAL, meaning ...
If optional ... arg LITERAL is non-nil, insert NEWTEXT literally.
Otherwise treat ‘\’ as special ...
My intent is to replace all…

user1404316
- 769
- 5
- 12
1
vote
1 answer
Use xcape-like Control_L=Escape only in Emacs evil insert-mode?
I like the idea of xcape for exiting insert-mode by just quickly tapping Control_L, but I don't like how it leaves "unconsumed" escapes around in other modes, or in other programs/terminals, which mess up my flow.
(E.g. input is xargs █oldcommand…

unhammer
- 1,127
- 8
- 22
1
vote
2 answers
Binding `M-ESC M-ESC`
Attempting to bind M-ESC M-ESC in the global map to a command:
(global-set-key (kbd "M-ESC M-ESC") #'my-command)
results in the following:
Debugger entered--Lisp error: (error "Key sequence M-ESC M-ESC starts with non-prefix key M-ESC ESC")
I…

Tianxiang Xiong
- 3,848
- 16
- 27
1
vote
0 answers
Map ESC to keyboard-escape-quit
I like Emacs but I hate the default shortcuts. I'm trying to make them more like Sublime Text, Atom, ...
Most shortcuts I can change without a problem, but ESC seems to be more difficult. I don't wont to press ESC 3 times or C-g to exit something.…

roeland
- 173
- 5