GNU bug report logs -
#57866
[PATCH] Extend comint-osc-handlers to support OSC 2
Previous Next
Reported by: Matthias Meulien <orontee <at> gmail.com>
Date: Fri, 16 Sep 2022 18:00:02 UTC
Severity: normal
Tags: patch
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Tags: patch
The attached patch adds support for OSC 2 escape sequences in comint buffers.
To test one can update `frame-title-format' with something like:
(setq frame-title-format
'("%b"
(:eval
(when (and
comint-osc-window-title
(not (string-empty-p comint-osc-window-title)))
(concat " - " comint-osc-window-title)))
(:eval
(if multiple-frames
""
(concat " - GNU Emacs at " system-name)))))
After M-x shell call a command (like flatpak-builder) that emits OSC 2
commands, the frame title is updated while the command runs.
Note that one is expected to extend Bash prompt command to print an OSC
2 command to clear the title:
set -x
osc_clear() {
printf "\e]2;\e\\"
}
PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }osc_clear
set +x
Regards,
In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, cairo version
1.16.0) of 2022-09-14 built on carbon
Repository revision: f0798ac13dcb4c01a883f165e03c3cd7f208667c
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Debian GNU/Linux 11 (bullseye)
Configured using:
'configure --with-native-compilation --with-x-toolkit=no'
[0001-Extend-comint-osc-handlers-to-support-OSC-2.patch (text/patch, attachment)]
This bug report was last modified 2 years and 248 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.