Variable: term-osc-handlers

term-osc-handlers is a variable defined in term.el.gz.

Value

nil

Documentation

Terminal-specific OSC sequence handler function alist.

OSC (Operating System Command) is a category of ANSI escape sequence used in terminal application to introduce custom commands. Terminals ignore unknown OSC sequences by default. Handlers can be registered here to add support for new OSC sequences to term.

Functions in this alist are passed matching valid OSC sequences as they're sent to the terminal.

Valid OSC sequences are of the form
  ESC ] code ; text BEL
  ESC ] code ; text ESC
Each entry has the form (CODE . FUNCTION), where CODE is the string that appears before the semicolon.

FUNCTION is called with two arguments CODE and TEXT, with TEXT being the content of the OSC sequence after the semicolon. When the function is called, the term buffer is active and with point and content valid at the time the OSC sequence appears in the stream.

Any code not on this alist is further looked up in ansi-osc-handlers, which collects OSC handlers that can also work outside of a terminal context. For details, see ansi-osc-apply-on-region.

Source Code

;; Defined in /usr/src/emacs/lisp/term.el.gz
(defvar term-osc-handlers nil
  "Terminal-specific OSC sequence handler function alist.

OSC (Operating System Command) is a category of ANSI escape sequence
used in terminal application to introduce custom commands.  Terminals
ignore unknown OSC sequences by default.  Handlers can be registered here
to add support for new OSC sequences to `term'.

Functions in this alist are passed matching valid OSC sequences as
they're sent to the terminal.

Valid OSC sequences are of the form
  ESC ] code ; text BEL
  ESC ] code ; text ESC \

Each entry has the form (CODE . FUNCTION), where CODE is the string that
appears before the semicolon.

FUNCTION is called with two arguments CODE and TEXT, with TEXT being the
content of the OSC sequence after the semicolon.  When the function is
called, the term buffer is active and with point and content valid at
the time the OSC sequence appears in the stream.

Any code not on this alist is further looked up in `ansi-osc-handlers',
which collects OSC handlers that can also work outside of a terminal
context.  For details, see `ansi-osc-apply-on-region'.")