From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#27442: Un-obsolete x-clipboard-yank, or provide analogous functional Date: Tue, 06 Jul 2021 16:18:18 +0200 Message-ID: <87bl7fv845.fsf@gnus.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> <831r8bhen3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38077"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: monnier@iro.umontreal.ca, 27442@debbugs.gnu.org, Hi-Angel@yandex.ru To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 06 16:19:28 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 1m0lv6-0009jH-Bh for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 06 Jul 2021 16:19:28 +0200 Original-Received: from localhost ([::1]:58374 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0lv5-0005JN-Co for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 06 Jul 2021 10:19:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52838) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0lug-0004j5-Su for bug-gnu-emacs@gnu.org; Tue, 06 Jul 2021 10:19:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38030) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0lug-0004Iu-Kb for bug-gnu-emacs@gnu.org; Tue, 06 Jul 2021 10:19:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m0luf-0003m0-P7 for bug-gnu-emacs@gnu.org; Tue, 06 Jul 2021 10:19:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 06 Jul 2021 14:19:01 +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.162558111214463 (code B ref 27442); Tue, 06 Jul 2021 14:19:01 +0000 Original-Received: (at 27442) by debbugs.gnu.org; 6 Jul 2021 14:18:32 +0000 Original-Received: from localhost ([127.0.0.1]:49576 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0luB-0003lD-QU for submit@debbugs.gnu.org; Tue, 06 Jul 2021 10:18:32 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:40632) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0lu9-0003ky-Ol for 27442@debbugs.gnu.org; Tue, 06 Jul 2021 10:18:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=UcXYCtMa0gZGEWAsUYKX306Z4pJjzUOCUrUzoVHIRpc=; b=dXlLGuOI1g6VLcx94mUxyHsxp/ leoavrWSVmpRWmBaU8skC4DVlPC2Ji4l2L0Fz82DOxI+wie8VxzKxOeOwpAA23Rzm22cp8bk73GQj SsvoZ2k+f4+oQd5k8kcIMufRA5769VKRLW6lRle+O/AXIFAjJIdA56mWrr68YdIgNbEk=; Original-Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m0ltz-0001oW-EY; Tue, 06 Jul 2021 16:18:22 +0200 X-Now-Playing: Sam Amidon's _Lily-O_: "Pat Do This, Pat Do That" In-Reply-To: <831r8bhen3.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 06 Jul 2021 14:21:04 +0300") 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:209518 Archived-At: Eli Zaretskii writes: >> 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? Selections have time stamps, so we could compare the time stamp from when we pushed the data onto the clipboard with what we have. I think? It's the timestamp parameter to/from XSetSelectionOwner/XConvertSelection/x_get_window_property_as_lisp_data. It's been years since I messed around with that stuff, so I could well be misremembering what the meaning of the timestamps are. >> 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? It just makes `M-x clipboard-yank' defeat the "check for duplicates" logic and always return the contents of the clipboard. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no