GNU bug report logs -
#27442
Un-obsolete x-clipboard-yank, or provide analogous functional
Previous Next
Reported by: Constantine Kharlamov <Hi-Angel <at> yandex.ru>
Date: Wed, 21 Jun 2017 15:33:01 UTC
Severity: normal
Tags: moreinfo, patch
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #21 received at 27442 <at> debbugs.gnu.org (full text, mbox):
> (defun gui-selection-value ()
> (let ((clip-text
> (when select-enable-clipboard
> (let ((text (gui--selection-value-internal 'CLIPBOARD)))
> (if (string= text "") (setq text nil))
>
> ;; Check the CLIPBOARD selection for 'newness', is it different
> ;; from what we remembered them to be last time we did a
> ;; cut/paste operation.
> (prog1
> (unless (equal text gui--last-selected-text-clipboard)
> text)
> (setq gui--last-selected-text-clipboard text)))))
>
> So, indeed, if you `M-x clipboard-yank', then kill some text in Emacs,
> you can't `M-x clipboard-yank' until you've clipboarded some other text,
> yanked it, and then clipboarded the original text again.
>
> Fixing this should be pretty trivial -- the following patch should do
> the trick, I think (although I haven't tested it). But I'm not quite
> sure about the intended logic here, so I've added Stefan M to the CCs --
> perhaps he has some comments.
AFAIK this part of the clipboard interaction is one I just preserved
from earlier code when I did my "gui-selection" rework.
I "just preserved" it because I don't really understand how it's
intended to work, nor do I understand enough of the design constraints
to be able to come up with my own design of how it should work :-(
Your patch looks acceptable to me (it is also disappointing because
it doesn't really help understand how this thing is intended to work,
but it follows the same principles as the ones I followed).
Stefan
This bug report was last modified 4 years and 14 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.