Subject: Re: bug#53894: 27.2; Clipboard copy -> C-y -> M-y -> Same clipboard copy does not push to kill ring

From: Po Lu <[email-masked]>
Date: Mon, 28 Feb 2022 09:01:23 +0800

Ignacio Casso <[email-masked]> writes:

> So I guess you mean that if the timestamp has not changed, we can't
> assume that the selection has not changed either and we need to confirm
> it by checking whether the selection text has changed. In other words,
> consider that the selection has changed if and only if either the
> timestamp or the text has.

Indeed, yes.

> If we implemented that, the only new case we would distinguish would be
> when the text has not changed but the timestamp has, which is precisely
> the case of the "bug" I reported.
>
> If (x-get-selection 'CLIPBOARD 'TIMESTAMP) works out of the box right
> now, maybe it's worth to implement it. And it it's not, we could still
> update the documentation that reflects the previous, incomplete
> understanding of the issue, e.g., in the last paragraph of the docstring
> for interprogram-paste-function or in the comments of the definition of
> gui-selection-value.
>
> I volunteer to do both if you agree that it would be an improvement.

I do agree, any patches would be greatly welcome.  Thanks in advance.