From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#27442: Un-obsolete x-clipboard-yank, or provide analogous functional Date: Tue, 06 Jul 2021 14:21:04 +0300 Message-ID: <831r8bhen3.fsf@gnu.org> References: <83r2ydupg7.fsf@gnu.org> <9b98217a-be79-56ed-16a9-0c15622111c5@yandex.ru> <877di4yhk8.fsf@gnus.org> <87eeccwzjx.fsf@gnus.org> <83a6n0hf9x.fsf@gnu.org> <87tul8v7v9.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18808"; mail-complaints-to="usenet@ciao.gmane.io" Cc: monnier@iro.umontreal.ca, 27442@debbugs.gnu.org, Hi-Angel@yandex.ru To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 06 13:22:13 2021 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 1m0j9Z-0004e9-4B for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 06 Jul 2021 13:22:13 +0200 Original-Received: from localhost ([::1]:54582 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0j9X-0002AQ-Sp for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 06 Jul 2021 07:22:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59104) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0j9P-00029v-TM for bug-gnu-emacs@gnu.org; Tue, 06 Jul 2021 07:22:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35962) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0j9O-0007nd-Pe for bug-gnu-emacs@gnu.org; Tue, 06 Jul 2021 07:22:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m0j9O-00059I-AG for bug-gnu-emacs@gnu.org; Tue, 06 Jul 2021 07:22:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 06 Jul 2021 11:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27442 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch moreinfo Original-Received: via spool by 27442-submit@debbugs.gnu.org id=B27442.162557046319724 (code B ref 27442); Tue, 06 Jul 2021 11:22:02 +0000 Original-Received: (at 27442) by debbugs.gnu.org; 6 Jul 2021 11:21:03 +0000 Original-Received: from localhost ([127.0.0.1]:47508 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0j8Q-000584-P6 for submit@debbugs.gnu.org; Tue, 06 Jul 2021 07:21:03 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:32876) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0j8O-00057F-Ha for 27442@debbugs.gnu.org; Tue, 06 Jul 2021 07:21:01 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:37918) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0j8I-0006yS-Oa; Tue, 06 Jul 2021 07:20:54 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3305 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0j8I-00015k-Bc; Tue, 06 Jul 2021 07:20:54 -0400 In-Reply-To: <87tul8v7v9.fsf@gnus.org> (message from Lars Ingebrigtsen on Mon, 05 Jul 2021 22:11:22 +0200) 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:209508 Archived-At: > From: Lars Ingebrigtsen > Cc: monnier@iro.umontreal.ca, Hi-Angel@yandex.ru, 27442@debbugs.gnu.org > Date: Mon, 05 Jul 2021 22:11:22 +0200 > > (kill-new "foo") > (gui-selection-value) > => nil > > Could we use a different way to identify this situation that's less > fragile? AFAIK, there's no reasonable way of doing a better check. > Hm... I don't really see any with our current low-level > functions. I think x-get-selection-internal could have returned more > metadata -- the timestamp, for instance, which would have allowed us to > see whether we ourselves really pushed the data to the clipboard. Where would that time stamp come from? > My analysis here may be wrong, but if this is the reason the code in > that function is the way it is, I think the right fix here is the > trivial patch I proposed, along with more comments in > `gui-selection-value' that explains what the point of the > duplicate-ignoring code is. I admit I don't really understand what the patch does and how. can you elaborate on that?