From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs 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 Message-ID: <867c7dljph.fsf@gnu.org> References: <8634iszpa5.fsf@gnu.org> <86y10ky9wf.fsf@gnu.org> <86wmg4xd2u.fsf@gnu.org> <86y10jwmsb.fsf@gnu.org> <86ldwiwvjc.fsf@gnu.org> <86ed27pfhj.fsf@gnu.org> <86a5cvpeiv.fsf@gnu.org> <86y10eo5h6.fsf@gnu.org> <986a3eea465e13c57bcdd7ce8f27f99d@finder.org> <864j2w6tz0.fsf@gnu.org> <861pxy5zxk.fsf@gnu.org> <86jzbq4i6x.fsf@gnu.org> <86frme4exq.fsf@gnu.org> <865xn5y2n0.fsf@gnu.org> <5e102d7d29eba618874c0b41e9815b8d@finder.org> <86ldw0ur0h.fsf@gnu.org> <86h66nq7vh.fsf@gnu.org> <83cf221bcf4fc4162c7401b9146d1961@finder.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5850"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gerd.moellmann@gmail.com, 74833@debbugs.gnu.org, fgunbin@fastmail.fm, shipmints@gmail.com, rms@gnu.org To: Jared Finder Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 02 09:11:21 2025 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tTGIb-0001N3-19 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 02 Jan 2025 09:11:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tTGIL-0001yU-Tk; Thu, 02 Jan 2025 03:11:06 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tTGIJ-0001xz-Vn for bug-gnu-emacs@gnu.org; Thu, 02 Jan 2025 03:11:04 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tTGIJ-0003Fw-Ng for bug-gnu-emacs@gnu.org; Thu, 02 Jan 2025 03:11:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=fB8oNZiFf48dnN1YDBY2+LqvPJRq7nh5q0I0P3CJNd8=; b=ndfWVs/vZ5JVXbI+MchtFwr+0YybRkYzc4+kuWADs5mtpW1talzkxNPlAUqz2B4PBaC0INuGCS3E0R8wPDX1o8n80qa3dcZZGItPkFvuM6w874RmGKF4faHDVzEHVF425FGGWOvlbRwmrTWaemK4z7z5MZaAmjwZ1PxRfSCP0yznO+8/NslBTi1VsguhfasvqTvCD1bXMcbmj87557Ag+ayi7bkLfBlDOw0F/GGWkbrKI88KetxLKmshxviFZJ63IXvIDBSHV7DRyENPcj8P/sWmpVAK1iXvEsIkde0OSRJMYbttk23NK6Ou9k03cuxG7VDXT2OLqqMHNnK3K8iTCg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tTGII-0003Gh-HY for bug-gnu-emacs@gnu.org; Thu, 02 Jan 2025 03:11:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Jan 2025 08:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74833 X-GNU-PR-Package: emacs Original-Received: via spool by 74833-submit@debbugs.gnu.org id=B74833.173580545312546 (code B ref 74833); Thu, 02 Jan 2025 08:11:02 +0000 Original-Received: (at 74833) by debbugs.gnu.org; 2 Jan 2025 08:10:53 +0000 Original-Received: from localhost ([127.0.0.1]:42652 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tTGI9-0003GI-2c for submit@debbugs.gnu.org; Thu, 02 Jan 2025 03:10:53 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52392) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tTGI4-0003G0-TR for 74833@debbugs.gnu.org; Thu, 02 Jan 2025 03:10:51 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tTGHz-0003Ea-5A; Thu, 02 Jan 2025 03:10:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=fB8oNZiFf48dnN1YDBY2+LqvPJRq7nh5q0I0P3CJNd8=; b=ZB+jjD3JB3JV 6mA9Gaj9ladGG/Ic+LlDmCPzNpjGhWWmHiN0U2FtX6SI809ypTk6x+v+eyhdmy6UehspAkHZVIRR3 Y/PmBs4qnaXRDZjvX5tmWPlY1Am98awfOjXdNwDC3ysb7PLkX6CPICjRBDf76I3DGECprH2z7GOto CTZJ6b1e8vITPEEO48H2BX1JjCJmltYCe7R+RDAYHruzXBXl/yYO4CsNaqf1dGlpmyYmVZJYtKS1E GnsDHIBqym814WGJIx5o1+RY9crUttwYghgzNZj17zPNQojjxVpkcwCa7bVDJHPDfdZe8WIyVIP+/ tR79uuKQSuI5vYYvzoStmg==; In-Reply-To: <83cf221bcf4fc4162c7401b9146d1961@finder.org> (message from Jared Finder on Wed, 01 Jan 2025 23:10:14 -0800) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:298143 Archived-At: > Date: Wed, 01 Jan 2025 23:10:14 -0800 > From: Jared Finder > Cc: shipmints@gmail.com, rms@gnu.org, gerd.moellmann@gmail.com, > fgunbin@fastmail.fm, 74833@debbugs.gnu.org > > On 2024-12-28 23:13, Eli Zaretskii wrote: > >> Date: Sat, 28 Dec 2024 21:16:28 -0800 > >> From: Jared Finder > >> Cc: shipmints@gmail.com, rms@gnu.org, gerd.moellmann@gmail.com, > >> fgunbin@fastmail.fm, 74833@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.