From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ship Mints 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, 19 Dec 2024 18:23:27 +0100 Message-ID: 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> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000007d808b0629a2ca99" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1377"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Gerd =?UTF-8?Q?M=C3=B6llmann?= , Eli Zaretskii , fgunbin@fastmail.fm, 74833@debbugs.gnu.org To: Jared Finder Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 19 18:25:17 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 1tOKGz-0000BX-D0 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 19 Dec 2024 18:25:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOKGs-0000Dh-Nx; Thu, 19 Dec 2024 12:25:12 -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 1tOKGl-00009c-F9 for bug-gnu-emacs@gnu.org; Thu, 19 Dec 2024 12:25:03 -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 1tOKGl-0007sz-3Z for bug-gnu-emacs@gnu.org; Thu, 19 Dec 2024 12:25:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:From:In-Reply-To:References:MIME-Version:To:Subject; bh=ZKZmsaE3334lWmk4l0cUfVsXDnetup/sFbvwgfUCZzU=; b=audW3o9gCnrSqus6G5h2LExJPgUo1IoUVEiiM53ccAiN2+ZsJw252bj/pKaVJQR7fWeBc7ed0NvsZasoj3HA4JhDXiqwp7Cw+2rycSvBgYOe8UOaM79vD89GUb13SYMoTr5Nt7CCe1JBEN6zw04Rv7MmgVaCId7StaI1aKGpQ38qij2p5Dr9Jw2f4RG6QeyB3u66VsMIeWYQzXtFZCX8vTLOl0ilvZZMDGm2IMpLoikyyihBg1ihdNN71EXegwXEawTabzfoGIeb9fRpXjvLPviHS17rK1pXmjQeWP6FuAUXQhLhxrcwa9FJQJLSjVDCKUdxfvbcjhay2IHJRtW8jQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tOKGj-0002no-Sd for bug-gnu-emacs@gnu.org; Thu, 19 Dec 2024 12:25:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ship Mints Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Dec 2024 17:25: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.173462908310741 (code B ref 74833); Thu, 19 Dec 2024 17:25:01 +0000 Original-Received: (at 74833) by debbugs.gnu.org; 19 Dec 2024 17:24:43 +0000 Original-Received: from localhost ([127.0.0.1]:39900 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tOKGQ-0002n9-A9 for submit@debbugs.gnu.org; Thu, 19 Dec 2024 12:24:42 -0500 Original-Received: from mail-ua1-f44.google.com ([209.85.222.44]:46381) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tOKGN-0002mz-IS for 74833@debbugs.gnu.org; Thu, 19 Dec 2024 12:24:41 -0500 Original-Received: by mail-ua1-f44.google.com with SMTP id a1e0cc1a2514c-85bc7d126b2so395041241.1 for <74833@debbugs.gnu.org>; Thu, 19 Dec 2024 09:24:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734629019; x=1735233819; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ZKZmsaE3334lWmk4l0cUfVsXDnetup/sFbvwgfUCZzU=; b=kKUtF0bIwmXOMjThPeD4R7WiZIN/CSx02Eo8Mj7XF/MQ/14A3Qyv2MDz5IpJuKiRvn UWSxN3UVqOdUlja2yug0cvdeatyMxIOFyZEfhG3PRB1e6jylIfyaNycEAon/c+6pO0bV BJMttD+a/CmsmqJIKDQi5CCn5E/q54k8uPkQhhAlj5C0yPyhh+inpUgtvTbeMf4cQ86w Qpp4ThIEKaA9EHPZbx9zrDWwi51gZhzmJ1r8Rg8xYp+ZfZRfiKYhTAr8Bt3ug8lnjqKg jpDDei0oLZrcMvFRNHHTysh8rNYaQJ1Il5av9pqyj6O2g8CerLmMPSQJ7uHORFb6rOdk DLzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734629019; x=1735233819; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ZKZmsaE3334lWmk4l0cUfVsXDnetup/sFbvwgfUCZzU=; b=Y+It2uDt3jwT+QYJ01gtR0MCK6ca9wq5DLx/YxqM2spapoiUTNVzo3crj+sBK/pQmd QUoJUNdPl28ALlhxx0pwdbHFNl8dI8jqpZiMLY9PurGhFapvtNUJ3CRgujPN4X6Um/O8 hRqqgPCYF/9IFbI6AWK0GXnzenx0Jekrl5sissQ6ExPulD+zKm6KRyiAs/iRdMA9yy18 h3lchP6wPDe+O2onuYiNC9F3R6r5AjECCj1XNihc94p567OXREPOtH/DdgACcks30Ccn WXPKMrwkkMuBVTRDD19FdpNB1KO8IhtuKod/C51o5VvTvdC4r6BkJdQJllHnZzH/6YG1 iRrw== X-Forwarded-Encrypted: i=1; AJvYcCXQ19IpQHAR9b4AVGYI5+i1VOgfejn8+jw6H/cOdObsacNeci+WwtcIOrXapqljo8tJL+lgcg==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yz3uwpomtsW9Urd1IBuj9mgu49nDrIenzuqp+SFQMK2hZmBDJnw /zqQ59Etr5FhlZCEC9H2slV02DAGLWiVzbx9E2k8nb02AjYFOaZdCRm+z58wYoY0BB3AKh/nHWN FQ7fXjHJaG2vrSboG2X7SPjqCUqU= X-Gm-Gg: ASbGncsve9zPzCCjZHIrz7RWgZ/Dtpte48BJ9bOTPoenkG6rgeb2Zif7Clw8/JivyYL NSumC+VE3WN5hUbw/TAhiF/wSAV0IFBAgxB2Qy/M= X-Google-Smtp-Source: AGHT+IEF5J0ZHufInRAb70yQ4RrSDqwMkOsP97ndNohOJ/kMSVn2kOjqW77aPlQExgOoYpSv0rlAMCBq6NJsZwYc+IA= X-Received: by 2002:a05:6122:1684:b0:516:2d4e:448a with SMTP id 71dfb90a1353d-51a36c7b638mr7555145e0c.3.1734629018925; Thu, 19 Dec 2024 09:23:38 -0800 (PST) In-Reply-To: <986a3eea465e13c57bcdd7ce8f27f99d@finder.org> 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:297401 Archived-At: --0000000000007d808b0629a2ca99 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I took a look at xclip's code, and its scope is larger than just macOS pasteboard integration. If I volunteered to help adopt xclip into Emacs, I'd have no easy way to test its scope beyond macOS. Perhaps it should remain an external package and people just install when needed. Equivalent mac-specific pasteboard integration could live in ns-win.el and be narrower in scope just for macOS users. As far as the proposed user option goes, "fallback" doesn't really convey any meaning to me. I know eglot adopted the convention "stay out of" to control that minor mode's enabling other minor modes. Perhaps a user option called xterm-stay-out-of-xclip, if that's a convention that people would like, or xterm-inhibit-enabling-xclip following long-standing Emacs inhibit conventions. This is moot until xclip becomes part of Emacs. On Thu, Dec 19, 2024 at 6:16=E2=80=AFAM Jared Finder wro= te: > On 2024-12-18 09:50, Ship Mints wrote: > > On Tue, Dec 17, 2024 at 1:32=E2=80=AFPM Eli Zaretskii wr= ote: > >> I don't see how this distinction (which I have no doubt is accurate) > >> is important to the decision we should make here. Simply put, > >> "something" that worked on Terminal.app before we turned on xt-moude > >> doesn't work in some cases after we turned it on. That's my bother. > > I see your point, Eli, for sure. Since this is on master, and > > presumably destined for Emacs 31, there seems to be sufficient time for > > people to read NEWS and PROBLEMS and accommodate their configurations > > while Emacs is brought one step forward into behaving, by default, like > > other terminal apps on macOS. > > > > I think someone suggested bringing xclip (seems properly licensed) into > > the core and now might be a good time to consider that. > > This seems like a good idea to me too. I think we'd also want a variable > to disable auto-enabling xclip-mode (let's call it > "xterm-enable-xclip-fallback" and assume it defaults to t). So when > Emacs detects it is running in Terminal.app and > xterm-enable-xclip-fallback is set, it enables xclip-mode. In all other > cases, no change is made. > > This does still result in a user-facing behavior change: instead of > pressing Command-c, a user would have to press Emacs' key binding, M-w > (or C-c if cua-mode is enabled). > > -- MJF > --0000000000007d808b0629a2ca99 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I took a look at xclip's=C2=A0code, and its scope is=C2=A0larger tha= n just macOS pasteboard integration. If I volunteered to help adopt xclip i= nto Emacs, I'd have no easy way to test its scope beyond macOS. Perhaps= it should remain an external package and people just install when needed. = Equivalent mac-specific pasteboard integration could live in ns-win.el and = be narrower in scope just for macOS users.

As far=C2=A0as the proposed user option goes,= "fallback" doesn't really convey any=C2=A0meaning to me. I k= now eglot adopted the convention "stay out of" to control that mi= nor mode's enabling=C2=A0other minor modes. Perhaps a user option calle= d xterm-stay-out-of-xclip, if that's a convention that people would lik= e, or xterm-inhibit-enabling-xclip following long-standing Emacs inhibit co= nventions. This is moot until xclip becomes part of Emacs.



On Thu, Dec 19, 2024 at 6:16=E2=80=AFAM Jared Finder <jared@finder.org> wrote:
On 2024-12-18 09:50, Ship Mints wrote= :
> On Tue, Dec 17, 2024 at 1:32=E2=80=AFPM Eli Zaretskii <eliz@gnu.org> wrote:
>> I don't see how this distinction (which I have no doubt is acc= urate)
>> is important to the decision we should make here.=C2=A0 Simply put= ,
>> "something" that worked on Terminal.app before we turned= on xt-moude
>> doesn't work in some cases after we turned it on.=C2=A0 That&#= 39;s my bother.
> I see your point, Eli, for sure. Since this is on master, and
> presumably destined for Emacs 31, there seems to be sufficient time fo= r
> people to read NEWS and PROBLEMS and accommodate their configurations =
> while Emacs is brought one step forward into behaving, by default, lik= e
> other terminal apps on macOS.
>
> I think someone suggested bringing xclip (seems properly licensed) int= o
> the core and now might be a good time to consider that.

This seems like a good idea to me too. I think we'd also want a variabl= e
to disable auto-enabling xclip-mode (let's call it
"xterm-enable-xclip-fallback" and assume it defaults to t). So wh= en
Emacs detects it is running in Terminal.app and
xterm-enable-xclip-fallback is set, it enables xclip-mode. In all other cases, no change is made.

This does still result in a user-facing behavior change: instead of
pressing Command-c, a user would have to press Emacs' key binding, M-w =
(or C-c if cua-mode is enabled).

=C2=A0 =C2=A0-- MJF
--0000000000007d808b0629a2ca99--