Questions tagged [escape]
The escape tag has no usage guidance.
25
questions
0
votes
0
answers
40
views
Key sequences that are translated to ESC
I understand from the FAQ that Escape is supposed to be the same as C-[: https://www.gnu.org/software/emacs/manual/html_node/efaq/Basic-keys.html
However, I could rebind C-[ without any problems ...
1
vote
0
answers
31
views
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 ...
1
vote
2
answers
69
views
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 ...
0
votes
1
answer
17
views
strange squares in term mode
For some time I have been seeing strange squares on term-mode
Here a example with 'top' command
I am using emacs 28.2.50 with -q option.
Any ideas ?
1
vote
1
answer
139
views
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
vote
1
answer
47
views
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 <execute>, <menu>, M-x.
...
1
vote
0
answers
119
views
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 ...
0
votes
1
answer
633
views
Unescape elisp string
I have a function which returns a file path, but the returned value has backslash excaped 'special' characters e.g.
"/home/fred/Documents/This\ file\ \(20200120\).txt"
but the function where I want ...
1
vote
0
answers
391
views
<M-S-return> (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". ...
0
votes
0
answers
206
views
How to make `ESC` key act like a real Meta modifier key?
I would like to make the ESC key act like a Meta (modifier) key.
For example, when I move backward by words by (M-b), I want to keep my pinky finger on ESC, not press it once for each backward move. ...
0
votes
0
answers
277
views
Ctrl-g will stop Emacs(terminal) and send it to background, ending with core-dump
I'm using Ubuntu server without GUI(ssh into the server), so I use Emacs in terminal, but since the first day I use it, Ctrl-g will stop Emacs and send it to background multiple times one day, it is ...
1
vote
1
answer
564
views
"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 ...
6
votes
2
answers
243
views
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 ...
1
vote
1
answer
473
views
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 ‘\’ ...
1
vote
1
answer
293
views
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 ...
3
votes
2
answers
873
views
Binding <ESC> <ESC> to have <ESC> <ESC> <ESC> 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 "<ESC> <ESC>")...
0
votes
2
answers
361
views
How to troubleshoot and diagnose escaped-character display errors in Emacs shell?
I make much use of sub-shells within Emacs (initiated via M-x shell), and, because of this, I run into problems like the one illustrated1 below way too often:
$ python -m pdb /tmp/hello_world.py
[2] ...
9
votes
4
answers
2k
views
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, ...
0
votes
1
answer
403
views
company M-(digit) shortcuts not working
I am using company to auto-complete. It works generally fine, with the exception of the M-(digit) shortcuts, which have no impact at all. I have no idea why.
This is my init code:
(defun company--my-...
1
vote
2
answers
554
views
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-...
-1
votes
1
answer
2k
views
How do you correctly escape characters in string for example %
I am trying to escape some text for a shell command, but i am gettig stuck with this error.
Not enough arguments for format string
From what i can tell its trying to interpret the % symbols.
This ...
1
vote
0
answers
2k
views
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 ...
2
votes
3
answers
202
views
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 ...
1
vote
1
answer
238
views
Emacs shell send ^] (hat-right-sqare-bracket)
Trying to run telnet in Emacs shell I cannot figure out how to send ^] to terminate it.
1
vote
1
answer
217
views
How to escape brackets in mu4e search queries?
Title says it all.
I want to have a search query which matches all messages whose Subject starts with [Spam]. So far, I tried the following:
[Spam]
[spam]
\[Spam\]
\[Spam\]
\\[Spam\\]
\\[Spam\\]
I'...