GNU bug report logs - #53894
27.2; Clipboard copy -> C-y -> M-y -> Same clipboard copy does not push to kill ring

Previous Next

Package: emacs;

Reported by: Ignacio Casso <ignaciocasso <at> hotmail.com>

Date: Wed, 9 Feb 2022 09:35:01 UTC

Severity: normal

Tags: patch

Found in version 27.2

Done: Po Lu <luangruo <at> yahoo.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Po Lu <luangruo <at> yahoo.com>
To: Ignacio Casso <ignaciocasso <at> hotmail.com>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 53894 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: bug#53894: 27.2; Clipboard copy -> C-y -> M-y -> Same clipboard copy does not push to kill ring
Date: Sat, 12 Feb 2022 10:28:45 +0800
Po Lu <luangruo <at> yahoo.com> writes:

> Ignacio Casso <ignaciocasso <at> hotmail.com> writes:
>
>> It is a typo indeed. Sorry, English is not my native language.
>
> Thanks, your analysis is indeed correct.  I will look into how other
> programs handle this problem and ack.

It is OK to rely on the timestamp always increasing, since the X server
ensures that there will be no races.  The timestamp is in server time,
so there is no need to worry about it moving backwards if the system
time is moved backwards.

So if (x-get-selection 'CLIPBOARD 'TIMESTAMP) is larger than the last
time it was recorded, then it is safe to say that the selection has
"changed".

However, it will still be necessary to keep the DWIM logic on X as a
fallback in the case that the clipboard timestamp has not changed, since
some clients are badly behaved and only change their record of the
current period's selection if they already own it.

On other systems it should work to rely on the clipboard modification
counters.




This bug report was last modified 3 years and 51 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.