Questions tagged [escape]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
2 answers
26 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 ...
  • 291
0 votes
1 answer
15 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 ?
  • 3,149
1 vote
1 answer
110 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 | |----...
  • 147
1 vote
1 answer
43 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
104 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 ...
  • 133
0 votes
1 answer
491 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 ...
  • 557
1 vote
0 answers
355 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". ...
  • 11
0 votes
0 answers
159 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. ...
  • 327
0 votes
0 answers
234 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 ...
  • 2,569
1 vote
1 answer
430 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 ...
  • 178
6 votes
2 answers
228 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,198
1 vote
1 answer
429 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
283 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 ...
  • 1,095
3 votes
2 answers
784 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
328 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] ...
  • 3,095
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
388 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
1 vote
2 answers
536 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
1k 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 ...
  • 553
1 vote
0 answers
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 ...
  • 173
2 votes
3 answers
182 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,547
1 vote
1 answer
226 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.
  • 11.1k
1 vote
1 answer
202 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'...
  • 1,529