From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#53894: 27.2; Clipboard copy -> C-y -> M-y -> Same clipboard copy does not push to kill ring Date: Thu, 10 Feb 2022 09:56:08 +0800 Message-ID: <87wni3zdqf.fsf@yahoo.com> References: <87mtj0l0wp.fsf@gnus.org> <87r18bg59w.fsf@gnus.org> Reply-To: Po Lu Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="537"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) Cc: Ignacio Casso , 53894@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 10 02:57:25 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nHyi4-000ATk-UG for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 10 Feb 2022 02:57:25 +0100 Original-Received: from localhost ([::1]:45452 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nHyi3-0000no-Fh for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 09 Feb 2022 20:57:23 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:60602) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHyhh-0000nd-Ta for bug-gnu-emacs@gnu.org; Wed, 09 Feb 2022 20:57:01 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59261) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nHyhh-0000vj-KW for bug-gnu-emacs@gnu.org; Wed, 09 Feb 2022 20:57:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nHyhh-0004Un-Ki for bug-gnu-emacs@gnu.org; Wed, 09 Feb 2022 20:57:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Feb 2022 01:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53894 X-GNU-PR-Package: emacs Original-Received: via spool by 53894-submit@debbugs.gnu.org id=B53894.164445818517233 (code B ref 53894); Thu, 10 Feb 2022 01:57:01 +0000 Original-Received: (at 53894) by debbugs.gnu.org; 10 Feb 2022 01:56:25 +0000 Original-Received: from localhost ([127.0.0.1]:53158 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHyh6-0004Ts-Kd for submit@debbugs.gnu.org; Wed, 09 Feb 2022 20:56:24 -0500 Original-Received: from sonic309-22.consmr.mail.ne1.yahoo.com ([66.163.184.148]:42307) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHyh5-0004Td-7B for 53894@debbugs.gnu.org; Wed, 09 Feb 2022 20:56:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1644458177; bh=NLrOfZCrp7nzL9WGKckfyxUCG200Nn4jh04VxvSi1DU=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=kK9OBaZBiZRx/i5qXCaYtjB32omyce+B4H4GvauuTP7+Nvnh/aroEvXXvskpaM0RQoJRup4iMFjmXTXIfYOOucecYkmrkl1+RtFREFhZex/Xx55EiNWRLXUKb28F1+OW0czURVoO47jL3HtDCcl/KOPAZAIB7Ctr6cxUSEln2SRqKWr8lfVZczD4J3GrwbpSmXfQ6eGHNnEK+xp1ithSLwsa5sVq82yGKehVSSMxNaLVuTDU4e04G7vKgHVZKLzshVN2/vEAcOs+kYldSsWnUssFvcgg0zb7OQXg4JLXyD1WNkyvDn8rcdYxfRMHr4pah19DYqAYugVQ7oOKRKK9fQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1644458177; bh=svfPfBv6CIXC342ZiDFRZOtEMw9v2j1g5m2jfFs2xN2=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=OI+FL+74Zp+Gu5dHXIhBWNmPttsR1EYKh2RWlHdFZQz4+sb4xXDoUuo0PlJWpCPRqMiGoi/ktCHlOBQrGqA7lo9l2ay+L3E6DadJp3Z8+OADzKHRn5OHhQ3z3WkHiaJ0fe89pAbBh6FDfOHbjeE5f7RJZeN+b3k13/QK2RKf/tNn2cTqd68es8+Cpk1ln2Qc8jhRk+vbq1nbp5MlIGwms6FTOOrClbnPZieuEAjmX5GmfBdr1SDHcUUypaEQ16mfhLFhHirDcBRrq5ygpUB/X9x6SlGE/softaDqXtX34xQH9FRdoX5Ukln49De7nL2BSvIdUztd3nu4XiJW9gPCtg== X-YMail-OSG: cCqOs10VM1lu0OYfKRV0jbv8YScV3bcz97B_nVWHYxzmThmQxgkoGJCKs39kz71 qMe9y7nNJTvyxlRU0jK5XKWYTR6fsRablTqcdY7Ph58RUxz1NIlTkSVis6.QTYl_FQtrV8RUxk8h iIdtzeRtevtFZrwrgAc_0hRFiWgMhpyFcUtgCkgwvZVEjd7aiew8GB_1_p9eUICoTEcLnLYzQ6iq rJpw8YfPt087go4RO38917tFWBPJYdShQbxAu0kZuuni2pL_hrMEEarxC0MZqSL6yL97h_8IrmhS gIRWRKMpgWhS2JEENWRp08QZ_R42KGnxlAcD4DdcDBHb12mNdNbiYt0_83keqv9DM46BYmWwZGYI lAodXlB9HD8XmM0c0ZIrUpuII_wG_bROBgIgfFn8.fPDneS4yqLZvFOKOh1tGBl2faQED99Qp09q hqKyNjP_5agRLWU7ID1kOETakxLPKz_Zx8N5zVhddumYlLR_xomkRl2elbo0Z12ZeRBb2neZ_0OO _P1DRweGhzN1B4ge7iMF1R0AoZG_MyTY3j8p41CtXo6juthOQP1wqHnhDVPY_VlvkjvLBSOAqawB uV4FwY5c6AfP9rBKJWya3jA9GJpysD8FRvlatjIlg8sLmdzpE0ikXMPJYJ1kkqLh170NDu06KNF8 xNXufYXLA9LShLWUFRT6Kg5q2a.9ZD3K6u8a0B4CVFogcpsHoQU7ZfedASLTMceNDDTykBLh0cB_ 53cZeUYW285Kg2CEJJ2QROTknOn73OjGp6Rd6dBQzQccU.TWFAD94RAZI4emk2y.FrGPkf7LLdA7 shhRxgqCB5D3IByCM5WjsxqmU_KaXs75vm6LlSOQVw X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic309.consmr.mail.ne1.yahoo.com with HTTP; Thu, 10 Feb 2022 01:56:17 +0000 Original-Received: by kubenode513.mail-prod1.omega.sg3.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 33858987e5f0492b4fe281ab141e8d81; Thu, 10 Feb 2022 01:56:13 +0000 (UTC) In-Reply-To: <87r18bg59w.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 09 Feb 2022 21:21:31 +0100") X-Mailer: WebService/1.1.19724 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:226518 Archived-At: Lars Ingebrigtsen writes: > Ignacio Casso writes: > >> This would also answer my original question: unless there was a >> timestamp in the clipboard Emacs has indeed no way to know right now if >> the exact same string was copied to the clipboard again in-between (in >> which case I would expect it to be pushed to the top of the kill-ring >> again) > > On X (at the very least), the clipboard does have a timestamp, though. > But we don't use it, which seems like the bug here. Probably. > > Po Lu's done some work in this area lately; added to the CCs. Every platform except MS-Windows has `x-selection-owner-p' or something to that effect which tells Emacs whether or not it was the last program to have saved to a selection (i.e., the clipboard, or the primary selection.) On the platforms where it does work reliably, Emacs uses it to determine whether or not to return nil from the interprogram-paste-function, so I don't see a problem here. Eli says MS-Windows also does something similar, but using a different mechanism. Thanks.