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#53894: 27.2; Clipboard copy -> C-y -> M-y -> Same clipboard copy does not push to kill ring Date: Wed, 09 Feb 2022 12:44:38 +0100 Message-ID: <87mtj0l0wp.fsf@gnus.org> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19197"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 53894@debbugs.gnu.org To: Ignacio Casso Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 09 12:47:10 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 1nHlRE-0004lH-OU for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 09 Feb 2022 12:47:08 +0100 Original-Received: from localhost ([::1]:43622 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nHlRD-0003ph-Ci for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 09 Feb 2022 06:47:07 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:57684) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHlPD-0003Cf-3X for bug-gnu-emacs@gnu.org; Wed, 09 Feb 2022 06:45:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56189) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nHlPC-0004F5-0X for bug-gnu-emacs@gnu.org; Wed, 09 Feb 2022 06:45:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nHlPC-00026R-06 for bug-gnu-emacs@gnu.org; Wed, 09 Feb 2022 06:45:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 09 Feb 2022 11:45: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.16444070918047 (code B ref 53894); Wed, 09 Feb 2022 11:45:01 +0000 Original-Received: (at 53894) by debbugs.gnu.org; 9 Feb 2022 11:44:51 +0000 Original-Received: from localhost ([127.0.0.1]:50086 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHlP1-00025j-3F for submit@debbugs.gnu.org; Wed, 09 Feb 2022 06:44:51 -0500 Original-Received: from quimby.gnus.org ([95.216.78.240]:35188) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHlOz-00025T-BD for 53894@debbugs.gnu.org; Wed, 09 Feb 2022 06:44:49 -0500 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=GVfvdDRWlVzJmJh0oX+6wc0AMpf/EWNNM8qmv3B2Z4Q=; b=Y1vsgyU7V5u8R3NsAimBVzWJZU X9iLqf1tHt6FhyTTKyYVfFer7B4t+OomMovN3uyhvtEvw3502VO9wIMVKLNKVREj/df7EDYu8AE4+ Grt66uYPtQd2HadpGHE4XHZwSQoABmfm3h0DWQZoou/X35REUJED/oFJfWy7JEAzSFgg=; Original-Received: from [84.212.220.105] (helo=giant) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nHlOq-0001sV-54; Wed, 09 Feb 2022 12:44:42 +0100 X-Now-Playing: The Bunch's _Hard Luck Stories (1): Sometimes it Happens_: "The Locomotion" In-Reply-To: (Ignacio Casso's message of "Wed, 09 Feb 2022 10:13:25 +0100") 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:226475 Archived-At: Ignacio Casso writes: > I'm not sure if it's intentional or not, or even if Emacs can do > anything about it (maybe since the text is the same, the clipboard is not > actually modified and Emacs has no way to know). I just wanted to report > it in case it is a bug. It's intentional: (defun gui-selection-value () (let ((clip-text (when select-enable-clipboard (let ((text (gui--selection-value-internal 'CLIPBOARD))) (when (string= text "") (setq text nil)) ;; When `select-enable-clipboard' is non-nil, ;; killing/copying text (with, say, `C-w') will push the ;; text to the clipboard (and store it in ;; `gui--last-selected-text-clipboard'). We check ;; whether the text on the clipboard is identical to this ;; text, and if so, we report that the clipboard is ;; empty. See (bug#27442) for further discussion about ;; this DWIM action, and possible ways to make this check ;; less fragile, if so desired. (prog1 (unless (equal text gui--last-selected-text-clipboard) text) (setq gui--last-selected-text-clipboard text))))) But it's pretty fragile DWIM action, and is frequently not what I mean, so I often resort to `clipboard-yank' instead to ensure that I really get the clipboard contents. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no