0

According to the NEWS for Emacs 28.1 (Ctrl-f "OSC 8, for hyperlinks"), the comint-mode supports the OSC 8 styled links. But when I compile (interpret) a file "test.py" with contents,

print(f'\033]8;;{"https://gnu.org"}\033\\{"GNU"}\033]8;;\033\\')

Via (compile "python3 test.py" t). I see something like this,

^[]8;;https://gnu.org^[\GNU^[]8;;^[\

What am I missing here?

1 Answer 1

2

What is the value of comint-output-filter-functions?

Note the specific wording of the Changelog entry:

*** Support for OSC escape sequences.
Adding the new function 'comint-osc-process-output' to
'comint-output-filter-functions' enables the interpretation of OSC
("Operating System Command") escape sequences in comint buffers.  By
default, only OSC 8, for hyperlinks, and OSC 7, for directory
tracking, are acted upon.  Adding more entries to
'comint-osc-handlers' allows a customized treatment of further escape
sequences.

You have to add comint-osc-process-output to the list of hooks in comint-output-filter-functions before this feature will operate. You can do this by adding (add-hook 'comint-output-filter-functions 'comint-osc-process-output) to your init file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.