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

Previous Next

Package: emacs;

Reported by: Filipp Gunbin <fgunbin <at> fastmail.fm>

Date: Thu, 12 Dec 2024 17:56:02 UTC

Severity: normal

Found in version 31.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jared Finder <jared <at> finder.org>
Cc: gerd.moellmann <at> gmail.com, 74833 <at> debbugs.gnu.org, fgunbin <at> fastmail.fm, shipmints <at> gmail.com, rms <at> gnu.org
Subject: bug#74833: 31.0.50; Copy to OS clipboard doesn't work in macOS Terminal.app with xterm-mouse-mode enabled
Date: Thu, 02 Jan 2025 10:10:34 +0200
> Date: Wed, 01 Jan 2025 23:10:14 -0800
> From: Jared Finder <jared <at> finder.org>
> Cc: shipmints <at> gmail.com, rms <at> gnu.org, gerd.moellmann <at> gmail.com,
>  fgunbin <at> fastmail.fm, 74833 <at> debbugs.gnu.org
> 
> On 2024-12-28 23:13, Eli Zaretskii wrote:
> >> Date: Sat, 28 Dec 2024 21:16:28 -0800
> >> From: Jared Finder <jared <at> finder.org>
> >> Cc: shipmints <at> gmail.com, rms <at> gnu.org, gerd.moellmann <at> gmail.com,
> >>  fgunbin <at> fastmail.fm, 74833 <at> debbugs.gnu.org
> >> 
> >> I'm proposing to add a single regexp that matches against the terminal
> >> name and version string. If there's a match, automatically enable
> >> xterm-mouse-mode. For terminals that aren't supported or don't support
> >> "\e[>0q", leave xterm-mouse-mode as is. No other complexity is needed. 
> >> A
> >> user can always customize xterm-mouse-mode (it's a user option) if 
> >> they
> >> want to enable it anyways.
> > 
> > Sounds okay, but can you post a patch to try?
> 
> Patch attached.

Thanks.  This LGTM, but please modify this comment:

> +(defun xterm--query-name-and-version ()
> +  "Get the terminal name and version string (XTVERSION)."
> +  ;; The default timeout time causes a noticeable startup delay on
> +  ;; terminals that ignore the query.
> +  (let ((xterm-query-timeout 0.1))

to the effect that we use non-default value of 0.1 because the default
(larger) value causes a noticeable startup delay.  It took me a few
seconds to understand the intent; initially I thought that you were
describing what happens when 0.1 is used.

> I also noticed outdated text in the docstring for xterm-mouse-mode and 
> attached a second patch to delete that text.
> [...]
> -Turn it on to use Emacs mouse commands, and off to use xterm mouse commands.
> -This works in terminal emulators compatible with xterm.  It only
> -works for simple uses of the mouse.  Basically, only non-modified
> -single clicks are supported.  When turned on, the normal xterm
> -mouse functionality for such clicks is still available by holding
> -down the SHIFT key while pressing the mouse button."
> +Turn it on to use Emacs mouse commands, and off to use xterm mouse
> +commands.  This works in terminal emulators compatible with xterm.  When
> +turned on, the normal xterm mouse functionality for such clicks is still
> +available by holding down the SHIFT key while pressing the mouse button."

This is also okay, but please add to the doc strings a reference to
sterm--init where we verify that the terminal is compatible with
xterm-mouse-mode.




This bug report was last modified 111 days ago.

Previous Next


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