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

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 04 Jan 2025 13:17:02 +0000

Your bug report

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

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
74833: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=74833
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#74833: 31.0.50; Copy to OS clipboard doesn't work in macOS Terminal.app with xterm-mouse-mode enabled
From: Eli Zaretskii <[email-masked]>
To: Jared Finder <[email-masked]>
Cc: [email-masked], [email-masked], [email-masked], [email-masked], [email-masked]
Date: Sat, 04 Jan 2025 15:15:55 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

> Date: Thu, 02 Jan 2025 08:55:02 -0800
> From: Jared Finder <[email-masked]>
> Cc: [email-masked], [email-masked], [email-masked],
>  [email-masked], [email-masked]
> 
> On 2025-01-02 00:10, Eli Zaretskii wrote:
> >> Date: Wed, 01 Jan 2025 23:10:14 -0800
> >> From: Jared Finder <[email-masked]>
> >> Cc: [email-masked], [email-masked], [email-masked],
> >>  [email-masked], [email-masked]
> >> 
> >> 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.
> 
> Comments addressed.  I've collapsed both patches down to one (it was 
> easier for me).

Thanks, installed on master, and closing the bug.

Subject: 31.0.50; Copy to OS clipboard doesn't work in macOS Terminal.app with xterm-mouse-mode enabled
From: Filipp Gunbin <[email-masked]>
To: [email-masked]
Date: Thu, 12 Dec 2024 20:54:53 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

macOS, Terminal.app, xterm-mouse-mode enabled
emacs -nw -Q
Select something with mouse, press Command-c
Try to paste into another program - text is not in the clipboard

Perhaps this is not new, I just tried xterm-mouse-mode for the first
time, given that it's now the default in master.

Trying different combinations of select-enable-clipboard and
select-enable-primary did not help (that variables are all I know in
this area).

Thanks.

In GNU Emacs 31.0.50 (build 43, aarch64-apple-darwin23.6.0, NS
 appkit-2487.70 Version 14.6 (Build 23G80)) of 2024-12-12 built on
 localhost
Repository revision: 9ccd459e8452cc9e6e81e53f26bbeef20d2d5bb7
Repository branch: master
System Description:  macOS 14.6

Configured using:
 'configure --enable-check-lisp-object-type --with-file-notification=no
 --with-native-compilation=no'

Configured features:
ACL GLIB GNUTLS LCMS2 LIBXML2 MODULES NS PDUMPER PNG RSVG SQLITE3
THREADS TOOLKIT_SCROLL_BARS WEBP XIM ZLIB