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: Sat, 14 Dec 2024 09:52:55 +0200 Message-ID: <86ldwiwvjc.fsf@gnu.org> References: <8634iszpa5.fsf@gnu.org> <86y10ky9wf.fsf@gnu.org> <86wmg4xd2u.fsf@gnu.org> <86y10jwmsb.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25424"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 74833@debbugs.gnu.org, shipmints@gmail.com To: Filipp Gunbin , Jared Finder Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 14 08:54:14 2024 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 1tMMyc-0006U2-7v for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 14 Dec 2024 08:54:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tMMyR-000394-84; Sat, 14 Dec 2024 02:54:03 -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 1tMMyQ-00038r-8f for bug-gnu-emacs@gnu.org; Sat, 14 Dec 2024 02:54:02 -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 1tMMyQ-0005Xu-1V for bug-gnu-emacs@gnu.org; Sat, 14 Dec 2024 02:54:02 -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=/1AlTmxgMQRJToujxLjQueaU9rXwkENSZUWUQy8W9Os=; b=hz1PVWBv/ap/r2I/yRqJfm1/O4YkbUP5VPAz8eaBbukMem/Ud6AfrR81q/QHMf9mUF7XDLVE/bfeDsUPrdgX1OsZhOWqNJAq74DnF+hHjCKB0LDmTjCRYDoVi1OK1sxt5951KqRMJiEe0uoTcliIoo1PnJxfSPLvizyPEnnkdwaOVyHZMafCWcgxxY6LJhxO1hfm81kb6vPxFy3cUSHjTXqOPo2G/D4GPBfkCkOUzIdI1sWoMaHhoHTp8loKT2n4T9zZPwUKGD6uUaDtKJdRaneqaBNDZeiGi4jFR5qf7Imek4K0I+xvt1iP2Lx5rytH/MXdgJfdjzw3kgzkuLmCIg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tMMyP-0001mB-SU for bug-gnu-emacs@gnu.org; Sat, 14 Dec 2024 02:54:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 14 Dec 2024 07:54:01 +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.17341627886740 (code B ref 74833); Sat, 14 Dec 2024 07:54:01 +0000 Original-Received: (at 74833) by debbugs.gnu.org; 14 Dec 2024 07:53:08 +0000 Original-Received: from localhost ([127.0.0.1]:45264 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tMMxT-0001ka-UQ for submit@debbugs.gnu.org; Sat, 14 Dec 2024 02:53:07 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:46452) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tMMxS-0001k3-KJ for 74833@debbugs.gnu.org; Sat, 14 Dec 2024 02:53:03 -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 1tMMxM-0005Q0-Tn; Sat, 14 Dec 2024 02:52:56 -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=/1AlTmxgMQRJToujxLjQueaU9rXwkENSZUWUQy8W9Os=; b=oOrhXjZ3JIdj I/hqg7Wlacsni+ufXMWwLja7AjuWhIDx2pNSC+9ocBdocnaqQbOpuz8YYqTJEyHw73DNqlwY2V69y 8NLYQsg1RNEBUH5B1tkHQrvXabfRNzt4ENSgRaLx12jWjSfu/F4FlVc+3lwBH9lWhNFCTE4vkicRE UKj2pasTnrVhoUNkVluOeTGkc7h9ZxXsF7nOtNbFS0Q0huZRUR67Q8zgzCQ5d4Bkd/6/sgbc97zZR v2qlaAOS9XVvzGjplIDKS86hvd4JHky5sP4yQyth3851XYEQ6Tr+CZowi1AbllR7wY5ZGsvSwpyUb vBJtWqH7jlqvj2hgXfF4Cw==; In-Reply-To: (message from Filipp Gunbin on Fri, 13 Dec 2024 23:32:39 +0300) 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:297006 Archived-At: > From: Filipp Gunbin > Cc: shipmints@gmail.com, 74833@debbugs.gnu.org > Date: Fri, 13 Dec 2024 23:32:39 +0300 > > On 13/12/2024 18:49 +0200, Eli Zaretskii wrote: > > >> From: Filipp Gunbin > >> Cc: Ship Mints , 74833@debbugs.gnu.org > >> Date: Fri, 13 Dec 2024 19:35:15 +0300 > >> > >> On 13/12/2024 09:21 +0200, Eli Zaretskii wrote: > >> > >> > So why is this an Emacs bug? It sounds like the OP expects something > >> > to happen which shouldn't, because the xterm protocol for selections > >> > and the clipboard are not supported by Terminal.app? In that case, > >> > this could be at best a feature request, not a bug. > >> > >> I'll try to explain differently. > >> > >> Without xterm-mouse-mode you can copy/paste from/into Terminal.app > >> window, looks like Terminal.app gives this ability on its own. This is > >> not integration with Emacs kill ring, no. Emacs cursor does not react > >> to mouse clicks, and selection happens with OS mouse pointer. Paste > >> works rather slow (bad idea to paste large chunks of text), but > >> tolerable. > >> > >> Now, yesterday my daily master build got me xterm-mouse-mode enabled, so > >> I did some testing just out of curiosity. Most of the things work, > >> including clicking and selection. However, Command-C now just doesn't > >> copy text to OS clipboard. And it's non-obvious that you should disable > >> xterm-mouse-mode to be able to copy. > > > > xterm-mouse-mode is supposed to be enabled only on terminals that load > > xterm.el, which means they are xterm-compatible. Does Terminal.app > > load xterm.el on startup? > > Terminal.app sets TERM=xterm-256color (this is configurable in "Settings > -> Profiles -> Advanced -> Declare terminal as", I doubt I ever changed > it), so xterm.el should be loaded, yes. > > Other term-related vars are: > > TERM_PROGRAM=Apple_Terminal > TERM_PROGRAM_VERSION=453 > TERM_SESSION_ID=1251C872-8246-4380-A2AE-ED1F8B649878 Then we should amend xterm.el to not allow xterm-mouse on this terminal. Jared, could you please add such a condition? And I think the Terminal.app developers should be told that pretending to be xterm without full support for all the xterm features is not TRT, and they should stop. Would someone please file an issue with their issue tracker?