unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Ignacio Casso <ignaciocasso@hotmail.com>
Cc: Lars Ingebrigtsen <larsi@gnus.org>,
	53894@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>
Subject: bug#53894: 27.2; Clipboard copy -> C-y -> M-y -> Same clipboard copy does not push to kill ring
Date: Mon, 28 Feb 2022 21:48:23 +0800	[thread overview]
Message-ID: <87czj73xw8.fsf@yahoo.com> (raw)
In-Reply-To: <PAXPR06MB77602AD2CED48EC3D9DDCC1BC6019@PAXPR06MB7760.eurprd06.prod.outlook.com> (Ignacio Casso's message of "Mon, 28 Feb 2022 13:12:44 +0100")

Ignacio Casso <ignaciocasso@hotmail.com> writes:

> Here I have not replaced the variable, since I have assumed that code
> under the obsolete/ directory does not need to be maintained, and C-h
> f tells me that function is not loaded by default. However there is a
> warning when compiling. Should I fix it?

I can do that instead, but see below.

> - Using new variables gui--last-clipboard-selection-fingerprint and
>   gui--last-primary-selection-fingerprint instead of
>   gui--last-selected-text-clipboard and
>   gui--last-selected-text-primary. They have the same purpose but hold
>   the text and the timestamp instead of just the text, and I have
>   updated the code everywhere they were referenced to use the
>   text-timestamp pair instead of just the text . Better ideas for the
>   names are welcome.

Can't you put a `timestamp' text property on strings stored inside the
old gui--last-selected-text-clipboard variable instead?

> - Just threw the idea that a better fingerprint would include the owner
>   of the selection, if timestamps are sometimes not updated precisely
>   when the owner changes, as Po Lu said.

What I said is that badly behaved clients do not change the timestamp to
take into account new data becoming available for clients they already
own.  The X server ensures that timestamps always increase with
selection ownership changes.

>> diff --git a/lisp/term/pc-win.el b/lisp/term/pc-win.el
>> index 327d51f275..2ae3cbd8b2 100644
>> --- a/lisp/term/pc-win.el
>> +++ b/lisp/term/pc-win.el
>> @@ -248,7 +248,7 @@ w16-selection-owner-p
>>          ;; Windows clipboard.
>>          (cond
>>           ((not text) t)
>> -         ((equal text gui--last-selected-text-clipboard) text)
>> +         ((equal text (car gui--last-clipbaord-selection-fingerprint)) t)
>>           (t nil)))))
>>  

> - Have not tested since I don't use Windows, but it's semantically
>   equivalent as before.

pc-win is for the MS-DOS port (which does work, and should be kept
working.)  However, I think this modification can be avoided by storing
the timestamp as a text property, which I proposed above.

Thanks.





  parent reply	other threads:[~2022-02-28 13:48 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-09  9:13 bug#53894: 27.2; Clipboard copy -> C-y -> M-y -> Same clipboard copy does not push to kill ring Ignacio Casso
2022-02-09 11:44 ` Lars Ingebrigtsen
2022-02-09 12:52   ` Ignacio Casso
2022-02-09 20:21     ` Lars Ingebrigtsen
2022-02-10  1:56       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-10  6:20         ` Eli Zaretskii
2022-02-10  6:31           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-10  6:42             ` Lars Ingebrigtsen
2022-02-10  6:48               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-10  8:37                 ` Lars Ingebrigtsen
2022-02-10 10:03                   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-10  6:39           ` Lars Ingebrigtsen
2022-02-10  8:06             ` Eli Zaretskii
2022-02-10  8:43               ` Lars Ingebrigtsen
2022-02-10 10:04                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-10 11:37                   ` Lars Ingebrigtsen
2022-02-10 12:08                 ` Eli Zaretskii
2022-02-10 12:14                   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-10 12:29                     ` Eli Zaretskii
2022-02-10 12:38                       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-10 12:49                         ` Lars Ingebrigtsen
2022-02-10 13:20                           ` Ignacio Casso
2022-02-11  1:05                             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-11 10:24                               ` Ignacio Casso
2022-02-11 11:16                                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-11 11:28                                   ` Ignacio Casso
2022-02-11 12:38                                     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-11 12:42                                       ` Ignacio Casso
2022-02-11 12:58                                         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-12  2:28                                           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-27 18:57                                             ` Ignacio Casso
2022-02-28  1:01                                               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-28 12:12                                                 ` Ignacio Casso
2022-02-28 13:35                                                   ` Eli Zaretskii
2022-02-28 14:22                                                     ` Ignacio Casso
2022-02-28 13:48                                                   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-02-28 14:35                                                     ` Ignacio Casso
     [not found]                                                     ` <87wnhfoy5h.fsf@hotmail.com>
2022-02-28 16:10                                                       ` Ignacio Casso
2022-03-01  0:42                                                         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-03-01  7:51                                                           ` Ignacio Casso
2022-03-01 13:19                                                             ` Eli Zaretskii
2022-03-01 15:29                                                               ` Ignacio Casso
2022-03-02  0:51                                                                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-03-02  7:44                                                                   ` Ignacio Casso
2022-03-02  7:59                                                                     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-03-02  8:37                                                                       ` Ignacio Casso
2022-03-02 10:03                                                                         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-03-09  7:41                                                                           ` Ignacio Casso
2022-03-09 13:47                                                                             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-03-24 19:59                                                                           ` Ignacio Casso
2022-03-25  6:25                                                                             ` Eli Zaretskii
2022-03-29 12:01                                                                           ` Ignacio Casso
2022-03-29 13:00                                                                         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-04-01 10:15                                                                           ` Ignacio Casso
2022-04-01 10:59                                                                             ` Eli Zaretskii
2022-04-01 11:23                                                                               ` Ignacio Casso
2022-04-01 12:04                                                                                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-04-01 12:15                                                                                   ` Eli Zaretskii
2022-04-01 12:57                                                                                     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-04-01 12:10                                                                                 ` Eli Zaretskii
2022-03-01 15:19                                                           ` Lars Ingebrigtsen
     [not found]                                                       ` <871qznc4qg.fsf@hotmail.com>
2022-02-28 16:56                                                         ` Ignacio Casso
     [not found]                                       ` <87v8xl376s.fsf@hotmail.com>
2022-02-11 12:48                                         ` Ignacio Casso
     [not found]                           ` <87pmnurelg.fsf@hotmail.com>
2022-02-10 14:29                             ` Ignacio Casso
2022-02-11  6:15                               ` Lars Ingebrigtsen
2022-02-11  8:16                                 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87czj73xw8.fsf@yahoo.com \
    --to=bug-gnu-emacs@gnu.org \
    --cc=53894@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=ignaciocasso@hotmail.com \
    --cc=larsi@gnus.org \
    --cc=luangruo@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).