From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Konstantin Kharlamov Newsgroups: gmane.emacs.bugs Subject: bug#56325: [REGRESSION] (clipboard-yank) always pastes from kill-ring after text copy Date: Thu, 30 Jun 2022 16:48:19 +0300 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7342"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.44.2 To: 56325@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 30 15:49:11 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 1o6uXf-0001hg-2u for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 30 Jun 2022 15:49:11 +0200 Original-Received: from localhost ([::1]:48366 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o6uXd-00085y-J3 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 30 Jun 2022 09:49:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51806) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o6uXW-00085b-Tg for bug-gnu-emacs@gnu.org; Thu, 30 Jun 2022 09:49:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39822) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o6uXW-00062o-L7 for bug-gnu-emacs@gnu.org; Thu, 30 Jun 2022 09:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o6uXW-0007ie-Hd for bug-gnu-emacs@gnu.org; Thu, 30 Jun 2022 09:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Konstantin Kharlamov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 30 Jun 2022 13:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 56325 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.165659692129643 (code B ref -1); Thu, 30 Jun 2022 13:49:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 30 Jun 2022 13:48:41 +0000 Original-Received: from localhost ([127.0.0.1]:33719 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o6uXA-0007i3-ND for submit@debbugs.gnu.org; Thu, 30 Jun 2022 09:48:40 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:55806) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o6uX7-0007ht-MY for submit@debbugs.gnu.org; Thu, 30 Jun 2022 09:48:39 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51618) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o6uX7-00082T-FB for bug-gnu-emacs@gnu.org; Thu, 30 Jun 2022 09:48:37 -0400 Original-Received: from forward104j.mail.yandex.net ([2a02:6b8:0:801:2::107]:51384) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o6uX4-0005xK-KJ for bug-gnu-emacs@gnu.org; Thu, 30 Jun 2022 09:48:37 -0400 Original-Received: from forward103q.mail.yandex.net (forward103q.mail.yandex.net [IPv6:2a02:6b8:c0e:50:0:640:b21c:d009]) by forward104j.mail.yandex.net (Yandex) with ESMTP id 588212F9B9F4 for ; Thu, 30 Jun 2022 16:48:20 +0300 (MSK) Original-Received: from vla1-2a93b1d0b0e8.qloud-c.yandex.net (vla1-2a93b1d0b0e8.qloud-c.yandex.net [IPv6:2a02:6b8:c0d:1e22:0:640:2a93:b1d0]) by forward103q.mail.yandex.net (Yandex) with ESMTP id 53CA356A0041 for ; Thu, 30 Jun 2022 16:48:20 +0300 (MSK) Original-Received: from vla5-3832771863b8.qloud-c.yandex.net (vla5-3832771863b8.qloud-c.yandex.net [2a02:6b8:c18:3417:0:640:3832:7718]) by vla1-2a93b1d0b0e8.qloud-c.yandex.net (mxback/Yandex) with ESMTP id DSE51S6LTU-mKf4tEaH; Thu, 30 Jun 2022 16:48:20 +0300 X-Yandex-Fwd: 2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1656596900; bh=eccsQBj9Rc1ftow44G6lgfGeLKgyv2wgqbWj659O938=; h=Date:To:From:Subject:Message-ID; b=mwzvqPo5hZoCC85dOotYm/6H5l/OKMGtqZYxn+a5VC9dH6aKYLTJPwoYtSGaadm6H 6MqU5gBGU53+5YO/FPCD/PWaDpLq3cWsOK0lynhRiKc9DLrkDKyllmrQd7z5jH54po ImNEyo1uRACBvAwciY1eiW6G/IKJ/PxPkzxhVP+A= Authentication-Results: vla1-2a93b1d0b0e8.qloud-c.yandex.net; dkim=pass header.i=@yandex.ru Original-Received: by vla5-3832771863b8.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id qp8Gc1VoWR-mJMavQG9; Thu, 30 Jun 2022 16:48:19 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) Received-SPF: pass client-ip=2a02:6b8:0:801:2::107; envelope-from=hi-angel@yandex.ru; helo=forward104j.mail.yandex.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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:235730 Archived-At: After upgrade to latest development version at: =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 fb0d95984b: Put the obsoletion earlier in th= e *Help* buffer I found out that using (clipboard-yank) and (x-clipboard-yank)=C2=A0when `select-enable-clipboard` is set to t, after copying a text to clipboard once, results in them pasting from kill-ring instead of clipboard. # Steps to reproduce 1. Create /tmp/.emacs file with the following content: (setq select-enable-clipboard nil inhibit-startup-screen t) (defun clipboard-yank-test () (interactive) (let ((select-enable-clipboard t)) (clipboard-yank))) (global-set-key "\C-y" 'clipboard-yank-test) (defun clipboard-copy-fixed () (interactive) (let ((select-enable-clipboard t)) (clipboard-kill-ring-save (region-beginning)(region-end)))) (global-set-key "\M-w" 'clipboard-copy-fixed) 2. Launch `HOME=3D/tmp/ emacs` 3. [you're in a *scratch* buffer] Move caret till word "create" on the 2nd line, select it by pressing M-f, then copy to the system clipboard by pressing M-w 4. Move caret to another word, e.g. "file" 5. Delete the word "file" by pressing M-d 5. Press C-y to paste the current clipboard content ## Expected A word "create" will be inserted as it is in the system clipboard. Note: (clipboard-yank-test) pastes from the system clipboard not the kill-ring due to `select-enable-clipboard` being set locally to t. ## Actual The word you deleted in *scratch* buffer will be inserted instead of "create".