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#64423: 29.0.92; save-interprogram-paste-before-kill doesn't prevent streaming large selections Date: Thu, 13 Jul 2023 21:39:51 +0300 Message-ID: <83o7kf4pvs.fsf@gnu.org> 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> <87jzv3kcpw.fsf@catern.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32398"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, sbaugh@janestreet.com, 64423@debbugs.gnu.org To: sbaugh@catern.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 13 20:40:40 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 1qK1F1-0008BI-Fh for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 13 Jul 2023 20:40:39 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qK1EX-0005Ld-A0; Thu, 13 Jul 2023 14:40:09 -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 1qK1EQ-0005LB-Te for bug-gnu-emacs@gnu.org; Thu, 13 Jul 2023 14:40: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 1qK1EQ-0002i7-Kp for bug-gnu-emacs@gnu.org; Thu, 13 Jul 2023 14:40:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qK1EQ-0002mF-5C for bug-gnu-emacs@gnu.org; Thu, 13 Jul 2023 14:40:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Jul 2023 18:40: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.168927358710643 (code B ref 64423); Thu, 13 Jul 2023 18:40:02 +0000 Original-Received: (at 64423) by debbugs.gnu.org; 13 Jul 2023 18:39:47 +0000 Original-Received: from localhost ([127.0.0.1]:40827 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qK1EA-0002lb-JQ for submit@debbugs.gnu.org; Thu, 13 Jul 2023 14:39:47 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:46786) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qK1E5-0002lK-KN for 64423@debbugs.gnu.org; Thu, 13 Jul 2023 14:39:44 -0400 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 1qK1Dz-0002cq-0a; Thu, 13 Jul 2023 14:39:35 -0400 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=f7xhdQXva9fIsRerM3jt/yffvUC4ZTfps/H+u4qgJZM=; b=kO9+cqZLZz6v emaYywsfK8+4r5YaqsPcfqzgrXlVEMC64+dTbyyC2gT8uRTpJBK5+hCk/gHBbNx07iHBqy/4y9Dk+ ukGbKAxgEHhrXNWcT9e7vaM7xgRRJZjOLGKVyoPac7VIZGCbcwfOYpUU00rK9c+zN+V1ra5Fv3Ais tA11/a1XbznraT+Fn7F1vSt5wMxLN4+FzvJ4rY1fu4t3w/P6Cucqy+FxiM6k5XFaVGAvrRHWiZBef eVzjGtWKe+EeB7YGY7kCcQC8SG+U0XsAUW6muUXeL30kwd5R7WOqf0GMMrsaky/duYw6UtrmT/dqR FRtc650alDSOp5hHlP2fzQ==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qK1Dy-0003vt-Cp; Thu, 13 Jul 2023 14:39:34 -0400 In-Reply-To: <87jzv3kcpw.fsf@catern.com> (sbaugh@catern.com) 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:265040 Archived-At: > From: sbaugh@catern.com > Date: Thu, 13 Jul 2023 16:17:32 +0000 (UTC) > Cc: luangruo@yahoo.com, sbaugh@janestreet.com, 64423@debbugs.gnu.org > > > 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) Fine by me, but please add a comment there explaining why we do that on X. Thanks.