bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#64423: 29.0.92; save-interprogram-paste-before-kill doesn't prevent


From: sbaugh
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)
User-agent: Gnus/5.13 (Gnus v5.13)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: sbaugh@catern.com
>> Date: Wed, 12 Jul 2023 19:18:21 +0000 (UTC)
>> Cc: Po Lu <luangruo@yahoo.com>, sbaugh@janestreet.com, 64423@debbugs.gnu.org
>> 
>> Eli Zaretskii <eliz@gnu.org> writes:
>> 
>> >> From: Po Lu <luangruo@yahoo.com>
>> >> Cc: sbaugh@janestreet.com,  sbaugh@catern.com,  64423@debbugs.gnu.org
>> >> Date: Sun, 09 Jul 2023 14:12:42 +0800
>> >> 
>> >> Eli Zaretskii <eliz@gnu.org> 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)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]