OSC 51 Reserved for Emacs
A number xterm sets aside for the Emacs shell, and does nothing with itself.
OSC 51 ; Pt ST
xterm’s Control Sequences document lists OSC 51 as “reserved for Emacs shell”: a number set aside so that Emacs’s terminal modes can use it for their own messages without clashing with anything xterm does. Emacs’s vterm package, for one, sends commands to Emacs through it. xterm itself does nothing with it (do_osc), and neither does libghostty-vt, which passes.
Support
| Terminal | Version | Support | Notes |
|---|---|---|---|
| VT220 | manual, 2nd ed., 1984 | No | OSC is not among the controls it recognizes (§4.2) |
| VT510 | manual, 1st ed., 1993 | No | ignores an OSC string (chapter 4) |
| xterm | patch 412, xterm-411a | No | reserved for the Emacs shell, and ignored |
| libghostty-vt | 0f171f6 | No | ignored |
| Konsole | 26.11.70, a24c3d71 | No | |
| ConEmu | build 230724, its documentation | No | not in ConEmu’s list, ANSI escape codes |
Validation
OSC51-1: Ignored
A
\e]51;Efind-file "~/notes"\a
B
|AB____|
cursor 1,3
reply none