bug#74833: 31.0.50; Copy to OS clipboard doesn't work in macOS Terminal.app with xterm-mouse-mode enabled

Philip Kaludercic <[email protected]>
Newsgroups gmane.emacs.bugs
Message-ID <[email protected]>
Jared Finder <[email protected]> writes:

> On 2026-08-15 23:21, Philip Kaludercic wrote:
>> Jared Finder <[email protected]> writes:
>>> On 2026-08-15 10:11, Philip Kaludercic wrote:
>>>> Jared Finder <[email protected]> writes:
>>>>> On 2026-08-15 07:13, Philip Kaludercic wrote:
>>>>>> Jared Finder <[email protected]> writes:
>>>>>> [...]
>>>>>> 
>>>>>>> +(defconst xterm--auto-xt-mouse-allowed-names
>>>>>>> +  (mapconcat (lambda (s) (concat "^" s "\\>"))
>>>>>>> +             '("Konsole"
>>>>>>> +               "WezTerm"
>>>>>>> +               ;; "XTerm"   ;Disabled because OSC52 support is
>>>>>>> opt-in only.
>>>>>>> +               "iTerm2"     ;OSC52 support has opt-in/out UI on
>>>>>>> first usage
>>>>>>> +               "kitty")
>>>>>>> +             "\\|")
>>>>>>> +  "Regexp for terminals that automatically enable
>>>>>>> `xterm-mouse-mode' at startup.
>>>>>>> +This will get matched against the terminal's XTVERSION string.
>>>>>> Would it be possible to add VTE
>>>>>> (https://gitlab.gnome.org/GNOME/vte)
>>>>>> to
>>>>>> this list, to support GNOME's terminal and other terminal emulators
>>>>>> that
>>>>>> use the library (AFAIK that include XFCE's and MATE's terminal
>>>>>> emulator).
>>>>>> [...]
>>>>> Don't modern versions of VTE now report OSC52 from a primary DA
>>>>> query?
>>>>> Try running "echo -e '\e[c'", is 52 in the returned list?
>>>> No, it responds with
>>> That's unfortunate.
>>> What does the terminal return from an XTVERSION request?  That's
>>> "echo
>>> -e '\e[>0q'".  Assuming the string is unique enough, we can add it to
>>> the list.
>> Both GNOME Terminal, Console and XFCE4 terminal respond with:
>>   :>|VTE(8001)^[\
>
> Great, adding "VTE" to the list of console names inside
> xterm--auto-xt-mouse-allowed-names should be sufficient.  Can someone
> with write access to the Emacs repo do that?  Ideally this is also
> done on the 31 branch.

I can push the following patch to emacs31 if Sean and/or Eli are OK with
it.  I have tested it with GNOME terminal and it does enable
xterm-mouse-mode in emacs -Q -nw:



>   -- MJF
0001-Add-VTE-to-list-of-auto-enabled-xterm-mouse-mode-ter.patch (text/x-diff, 897 B)
From 0da80cadf98246aad15a53f8db1e4c72296cb54e Mon Sep 17 00:00:00 2001
From: Philip Kaludercic <[email protected]>
Date: Sun, 16 Aug 2026 19:26:43 +0200
Subject: [PATCH] Add "VTE" to list of auto-enabled xterm-mouse-mode terminals

* lisp/term/xterm.el (xterm--auto-xt-mouse-allowed-names): Add
entry to match VTE, GNOME's terminal emulation library.
(Bug#74833)
---
 lisp/term/xterm.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el
index 60a992a7e7b..3bef88d5010 100644
--- a/lisp/term/xterm.el
+++ b/lisp/term/xterm.el
@@ -106,6 +106,7 @@ xterm-paste-ending-sequence
 (defconst xterm--auto-xt-mouse-allowed-names
   (rx string-start
       (or "Konsole"
+          "VTE"
           "WezTerm"
           ;; "XTerm"   ;Disabled because OSC52 support is opt-in only.
           "iTerm2"     ;OSC52 support has opt-in/out UI on first usage
-- 
2.47.3
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.