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

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

bug#27442: Un-obsolete x-clipboard-yank, or provide analogous functional


From: Lars Ingebrigtsen
Subject: bug#27442: Un-obsolete x-clipboard-yank, or provide analogous functional
Date: Tue, 06 Jul 2021 16:18:18 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> Hm...  I don't really see any with our current low-level
>> functions.  I think x-get-selection-internal could have returned more
>> metadata -- the timestamp, for instance, which would have allowed us to
>> see whether we ourselves really pushed the data to the clipboard.
>
> Where would that time stamp come from?

Selections have time stamps, so we could compare the time stamp from
when we pushed the data onto the clipboard with what we have.  I think?
It's the timestamp parameter to/from
XSetSelectionOwner/XConvertSelection/x_get_window_property_as_lisp_data.

It's been years since I messed around with that stuff, so I could well
be misremembering what the meaning of the timestamps are.

>> My analysis here may be wrong, but if this is the reason the code in
>> that function is the way it is, I think the right fix here is the
>> trivial patch I proposed, along with more comments in
>> `gui-selection-value' that explains what the point of the
>> duplicate-ignoring code is.
>
> I admit I don't really understand what the patch does and how.  can
> you elaborate on that?

It just makes `M-x clipboard-yank' defeat the "check for duplicates"
logic and always return the contents of the clipboard.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

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