From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#64423: 29.0.92; save-interprogram-paste-before-kill doesn't prevent streaming large selections Date: Sun, 09 Jul 2023 08:39:51 +0800 Message-ID: <87zg45ex48.fsf@yahoo.com> References: <875y72ieq8.fsf@catern.com> <87cz193eno.fsf@yahoo.com> <87jzvgse4k.fsf@yahoo.com> <87pm58phyu.fsf@catern.com> <87y1jwqqel.fsf@yahoo.com> <87mt0bq4py.fsf@catern.com> <87mt06mk7w.fsf@catern.com> <831qhicpsy.fsf@gnu.org> <83zg46b8fa.fsf@gnu.org> Reply-To: Po Lu Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7378"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Spencer Baugh , 64423@debbugs.gnu.org, sbaugh@catern.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 09 02:41:15 2023 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 1qIIUE-0001lQ-PM for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 09 Jul 2023 02:41:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qIIU3-0000Ml-I2; Sat, 08 Jul 2023 20:41:03 -0400 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 1qIIU2-0000Ma-Sv for bug-gnu-emacs@gnu.org; Sat, 08 Jul 2023 20:41:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qIIU2-0000g5-LF for bug-gnu-emacs@gnu.org; Sat, 08 Jul 2023 20:41:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qIIU2-0005aM-51 for bug-gnu-emacs@gnu.org; Sat, 08 Jul 2023 20:41:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 09 Jul 2023 00:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64423 X-GNU-PR-Package: emacs Original-Received: via spool by 64423-submit@debbugs.gnu.org id=B64423.168886321121362 (code B ref 64423); Sun, 09 Jul 2023 00:41:02 +0000 Original-Received: (at 64423) by debbugs.gnu.org; 9 Jul 2023 00:40:11 +0000 Original-Received: from localhost ([127.0.0.1]:45352 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qIITC-0005YS-Nf for submit@debbugs.gnu.org; Sat, 08 Jul 2023 20:40:11 -0400 Original-Received: from sonic306-22.consmr.mail.ne1.yahoo.com ([66.163.189.84]:44606) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qIIT9-0005Xy-K1 for 64423@debbugs.gnu.org; Sat, 08 Jul 2023 20:40:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1688863202; bh=gz1s0i5M17rJBUKk4XK2MmMw+xbzpp6/JScsvNZc6zA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=gE8jAi8X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S7SJ7B9V0Pe1YwvnUUj21Bhdgkbw2a1cb12AGpDEKuLe7B17hwzJbWwaOX0w26Tlg HNczrid8PrncMpwgKm4MV69YLxSF0pgBcwVinB6GKpUPBqypoZrSJGKxGMM7Q1HuCRnfHnXEQwck yvUEcEnJMrlF4dT4a0pzVaQtm_y3TSGbSP0wS4ONgjYmh6IUW69ImqiWKUTO_jEoKwmUwLCdCYmt XFuspzQnGXb0nD0r0L5ei1n30LqbqWrZT3IUWQXLQaYTDfjfWzFr5J4ndWr9pV3bc8DCNISaPBi. C8aJMjC.1PVUqAv7j8AdbClfmOcjKkko5lPbRvTz4jFN85xb_jVeii62GVWFEN7LHFjXFzEPt9A7 12IKblkvqaYN4lv.X17zc4GFdk.PGcbcCXh.xE4SKC_Ihv6_zJ1EhTu4WZWeDyI0zAKioLEjJ6gP NzScTGGvmTf9doZJ4AbOlVmFo_VrFyn0aDJtcS9JuyFHHnBOhITAKTkv3ZMUr4dkecxK9KMTUN4L uglBGEhoSh8bsqB3eeerF2CLh5dWrY9oKcXt3K2uU9lzRosXfCaCrsBVz3vo9Pv96g_EosEsU2oh JD0CfSq6mmQNzwjLEAi27eBHQdqZZGcsAJoyAitwBe X-Sonic-MF: X-Sonic-ID: 251c0a3d-fb5b-4278-bcec-d18956884c7a Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.ne1.yahoo.com with HTTP; Sun, 9 Jul 2023 00:40:02 +0000 Original-Received: by hermes--production-sg3-67fd64777-rc8tr (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 9627e90dd7c70d9a29e1fcd859dd9b05; Sun, 09 Jul 2023 00:39:58 +0000 (UTC) In-Reply-To: <83zg46b8fa.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 08 Jul 2023 20:49:13 +0300") X-Mailer: WebService/1.1.21638 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo 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:264804 Archived-At: Eli Zaretskii writes: >> From: Spencer Baugh >> Cc: sbaugh@catern.com, luangruo@yahoo.com, 64423@debbugs.gnu.org >> Date: Sat, 08 Jul 2023 13:07:37 -0400 >> >> Eli Zaretskii writes: >> >> Cc: Spencer Baugh , 64423@debbugs.gnu.org >> >> From: sbaugh@catern.com >> >> Date: Sat, 08 Jul 2023 16:39:00 +0000 (UTC) >> >> >> >> diff --git a/lisp/simple.el b/lisp/simple.el >> >> index 26944f1f72d..95d00cc506b 100644 >> >> --- a/lisp/simple.el >> >> +++ b/lisp/simple.el >> >> @@ -5618,8 +5618,10 @@ kill-new >> >> (if (fboundp 'menu-bar-update-yank-menu) >> >> (menu-bar-update-yank-menu string (and replace (car kill-ring))))) >> >> (when save-interprogram-paste-before-kill >> >> - (let ((interprogram-paste (and interprogram-paste-function >> >> - (funcall interprogram-paste-function)))) >> >> + (let ((interprogram-paste >> >> + (ignore-error 'quit >> >> + (and interprogram-paste-function >> >> + (funcall interprogram-paste-function))))) >> >> (when interprogram-paste >> >> (setq interprogram-paste >> >> (if (listp interprogram-paste) >> > >> > Are you sure this is TRT for all the implementations of GUI >> > selections? AFAIU, the discussion was only about X. >> >> Independent of that discussion, I think this change should be harmless. > > How do you know that? The prudent thing in Emacs is to "do no harm", > i.e. try hard not to affect any code that is unrelated to the problem. > Assuming that a change is harmless is a mother of all bugs. > >> The worst thing that this change can cause is that a call to kill-new >> can complete successfully when it otherwise would have failed. > > No, I think you can also do the reverse. And anyway, this kind of > "reasoning" is what gets us in trouble time and again. Why risk all > those potential problems, where the original issue doesn't exist in > the first place? > >> But, also, I believe the discussion makes sense for platforms besides X: >> if there's a bug in the current owner of the clipboard, then taking >> ownership of the clipboard in Emacs will let us avoid that bug. And >> this change to ignore quits will allow the user to take ownership of the >> selection in that way, whereas they previously would not be able to >> (without manually writing some Lisp anyway). > > You do realize that some window systems Emacs support have no notion > of "clipboard ownership" or "selection ownership" whatsoever? > > So please modify the patch to affect only X, TIA. It's impossible to quit from selection transfers in other window systems anyway, except perhaps PGTK when the toolkit is feeling generous.