GNU bug report logs - #57866
[PATCH] Extend comint-osc-handlers to support OSC 2

Previous Next

Package: emacs;

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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 57866 in the body.
You can then email your comments to 57866 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#57866; Package emacs. (Fri, 16 Sep 2022 18:00:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Matthias Meulien <orontee <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 16 Sep 2022 18:00:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Matthias Meulien <orontee <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Extend comint-osc-handlers to support OSC 2
Date: Fri, 16 Sep 2022 19:59:26 +0200
[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)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57866; Package emacs. (Sun, 18 Sep 2022 11:13:01 GMT) Full text and rfc822 format available.

Message #8 received at 57866 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Matthias Meulien <orontee <at> gmail.com>
Cc: 57866 <at> debbugs.gnu.org
Subject: Re: bug#57866: [PATCH] Extend comint-osc-handlers to support OSC 2
Date: Sun, 18 Sep 2022 13:11:57 +0200
Matthias Meulien <orontee <at> gmail.com> writes:

> The attached patch adds support for OSC 2 escape sequences in comint buffers.

This patch was obsoleted by the one in bug#57821, so I'm closing this
bug report.




bug closed, send any further explanations to 57866 <at> debbugs.gnu.org and Matthias Meulien <orontee <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 18 Sep 2022 11:13:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 16 Oct 2022 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 193 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.