Questions tagged [escape]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
36 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. ...
0
votes
0answers
51 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
1answer
154 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 ...
0
votes
0answers
249 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
0answers
89 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. ...
8
votes
4answers
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
0answers
137 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
1answer
209 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 ...
5
votes
2answers
178 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 ...
0
votes
2answers
244 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] ...
1
vote
1answer
285 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
1answer
213 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
2answers
524 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>")...
1
vote
1answer
162 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'...
0
votes
1answer
349 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
2answers
467 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
1answer
925 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
0answers
1k 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
3answers
116 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
1answer
207 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.