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


Message #107 received at 53894 <at> debbugs.gnu.org (full text, mbox):

From: Ignacio Casso <ignaciocasso <at> hotmail.com>
To: Po Lu <luangruo <at> yahoo.com>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 53894 <at> debbugs.gnu.org,
 Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#53894: 27.2; Clipboard copy -> C-y -> M-y -> Same clipboard
 copy does not push to kill ring
Date: Sun, 27 Feb 2022 19:57:46 +0100
Hello again,

Sorry for not answering earlier, my original intention was just to
report the bug and clarify the misunderstanding and then leave you all
to discuss it since you would know better what to do. But I though this
could be a chance to make my first Emacs contribution so I'm reviving
the discussion.

> 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.

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.

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. Not
because it's actually important for me (again, all of this began because
I started reporting the bugs I had written down over my time using
Emacs, most of which I did not really care about), but because I see it
as a chance to get started in contributing to free software and Emacs.

Let me know what you think.

Regards,

Ignacio




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.