From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: sbaugh@catern.com Newsgroups: gmane.emacs.bugs Subject: bug#64423: 29.0.92; save-interprogram-paste-before-kill doesn't prevent streaming large selections Date: Thu, 13 Jul 2023 16:17:32 +0000 (UTC) Message-ID: <87jzv3kcpw.fsf@catern.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> <87zg45ex48.fsf@yahoo.com> <83h6qdbong.fsf@gnu.org> <87sf9xehph.fsf@yahoo.com> <83cz11bn0g.fsf@gnu.org> <87wmz5j5vn.fsf@catern.com> <83pm4w5sdp.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31174"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: luangruo@yahoo.com, sbaugh@janestreet.com, 64423@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 13 18:18:26 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 1qJz1N-0007mL-1o for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 13 Jul 2023 18:18:25 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qJz15-0000vQ-02; Thu, 13 Jul 2023 12:18:07 -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 1qJz12-0000vC-OE for bug-gnu-emacs@gnu.org; Thu, 13 Jul 2023 12:18:04 -0400 Original-Received: from [2001:470:142:5::43] (helo=debbugs.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qJz12-0002nO-Fi for bug-gnu-emacs@gnu.org; Thu, 13 Jul 2023 12:18:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qJz10-0004k9-8a for bug-gnu-emacs@gnu.org; Thu, 13 Jul 2023 12:18:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: sbaugh@catern.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Jul 2023 16:18: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.168926506018192 (code B ref 64423); Thu, 13 Jul 2023 16:18:02 +0000 Original-Received: (at 64423) by debbugs.gnu.org; 13 Jul 2023 16:17:40 +0000 Original-Received: from localhost ([127.0.0.1]:40668 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qJz0d-0004jL-I3 for submit@debbugs.gnu.org; Thu, 13 Jul 2023 12:17:39 -0400 Original-Received: from s.wrqvwxzv.outbound-mail.sendgrid.net ([149.72.154.232]:49792) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qJz0b-0004j5-VP for 64423@debbugs.gnu.org; Thu, 13 Jul 2023 12:17:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=catern.com; h=from:subject:in-reply-to:references:mime-version:to:cc:content-type: content-transfer-encoding:cc:content-type:from:subject:to; s=s1; bh=yCumUHZdzQXTmWsnxDelKZvBXJQcpe3sP+Q2GAb0ka0=; b=mq71xIXN8xeobCtCfP9+T3/o/A5CgmGVsUVAHcmax1fu0G5b5mgD2iM9TpzIPnyIod7B lzYgvifiRfavi11ASluSozFipGWe4ahyvi8jwYctmNhxM08JS9NTEVgdD4xPhbl/GZW2Fj yDvh3WG+Q3BVwHIS4Vaz48qZLk8Fl/2XvNTC7H55M5xBJJ2lT6dVZ7C70uqPQAet7kuXcE q5fPKfXDQZT3/u5JiottWqqmralqirSTjpWvTUF9/d1b+QhZeHzXPBrFZYfY7UaqQO3nUc 8/ONHBqMp2eap9EGCEVeNdYp+09318Y07ebW6gfCWadLglbzyXk+mIcq+rg4ECRQ== Original-Received: by filterdrecv-77869f68cc-5zdvl with SMTP id filterdrecv-77869f68cc-5zdvl-1-64B0239C-15 2023-07-13 16:17:32.242961848 +0000 UTC m=+5503290.040817803 Original-Received: from earth.catern.com (unknown) by geopod-ismtpd-27 (SG) with ESMTP id Kkw8ot4HQrmMpW96XWo5sQ Thu, 13 Jul 2023 16:17:32.168 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=::1; helo=localhost; envelope-from=sbaugh@catern.com; receiver=gnu.org Original-Received: from localhost (localhost [IPv6:::1]) by earth.catern.com (Postfix) with ESMTPSA id C11CA6009C; Thu, 13 Jul 2023 12:17:31 -0400 (EDT) In-Reply-To: <83pm4w5sdp.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 13 Jul 2023 07:48:18 +0300") X-SG-EID: ZgbRq7gjGrt0q/Pjvxk7wM0yQFRdOkTJAtEbkjCkHbJ/xuduLktfpMJYGrpSkRayO/H6u/ypRLypVYvJ/girAStMobO5NeWTMamJ0bYOcz464nFZAChk5KNh7uGV0DenlaEjknGEo+Y+XE1V7U/JZrOtEgqHqnOQOFlGWAzeX+accXOIooHdIRk5g/yJsZju6Rgj2I6ipHmsvAAs5gbCHg== X-Entity-ID: d/0VcHixlS0t7iB1YKCv4Q== 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:265028 Archived-At: Eli Zaretskii writes: >> From: sbaugh@catern.com >> Date: Wed, 12 Jul 2023 19:18:21 +0000 (UTC) >> Cc: Po Lu , sbaugh@janestreet.com, 64423@debbugs.gnu.org >> >> Eli Zaretskii writes: >> >> >> From: Po Lu >> >> Cc: sbaugh@janestreet.com, sbaugh@catern.com, 64423@debbugs.gnu.org >> >> Date: Sun, 09 Jul 2023 14:12:42 +0800 >> >> >> >> Eli Zaretskii writes: >> >> >> >> > Why "impossible"? Part of the processing is in Lisp, so it is >> >> > definitely possible. >> >> >> >> That processing is also performed under X. Anyway, I see no need to >> >> disable this code on other window systems. >> > >> > Right, so we agree that a change for this issue should be X-specific. >> >> Isn't that the opposite of what he said? That there's no need to >> disable this code (which I assume refers to the code I added) on other >> window systems? > > If that's what he said, then we don't agree. > >> (Personally I don't care whether this is disabled on other window >> systems or not, but if it is disabled on other window systems I'd rather >> do it in a way that is not objectionable to Po Lu) > > You can do it in a way that is not objectionable to either of us. It > is very simple: make the changes conditioned on X. OK, how about this? modified lisp/simple.el @@ -5618,8 +5618,11 @@ 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 + (and interprogram-paste-function + (if (eq (window-system) 'x) + (ignore-error 'quit (funcall interprogram-paste-function)) + (funcall interprogram-paste-function))))) (when interprogram-paste (setq interprogram-paste (if (listp interprogram-paste)