GNU bug report logs - #27442
Un-obsolete x-clipboard-yank, or provide analogous functional

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Constantine Kharlamov <Hi-Angel@HIDDEN>; dated Wed, 21 Jun 2017 15:33:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 27442 <at> debbugs.gnu.org:


Received: (at 27442) by debbugs.gnu.org; 21 Jun 2017 19:57:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 21 15:57:42 2017
Received: from localhost ([127.0.0.1]:60287 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dNlkz-00030r-G3
	for submit <at> debbugs.gnu.org; Wed, 21 Jun 2017 15:57:41 -0400
Received: from forward14m.cmail.yandex.net ([5.255.216.145]:56470)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <Hi-Angel@HIDDEN>) id 1dNljU-0002yZ-8v
 for 27442 <at> debbugs.gnu.org; Wed, 21 Jun 2017 15:56:09 -0400
Received: from smtp1o.mail.yandex.net (smtp1o.mail.yandex.net [37.140.190.26])
 by forward14m.cmail.yandex.net (Yandex) with ESMTP id AB302229F6;
 Wed, 21 Jun 2017 22:56:01 +0300 (MSK)
Received: from smtp1o.mail.yandex.net (localhost.localdomain [127.0.0.1])
 by smtp1o.mail.yandex.net (Yandex) with ESMTP id AEE561300ABC;
 Wed, 21 Jun 2017 22:56:00 +0300 (MSK)
Received: by smtp1o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id
 g3YBzIy8Hq-txHeX563; Wed, 21 Jun 2017 22:55:59 +0300
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client certificate not present)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail;
 t=1498074959; bh=Uh4FY6Rlrgw0q4uNOaGTG9fw6dtU/DDzTNV3wejoA4Y=;
 h=Subject:To:Cc:References:From:Message-ID:Date:In-Reply-To;
 b=w5arGgjttcICZbJMTnmCjtxTcKEO3ul5aAPJxvvqdVRs7hGXWVAOWgAxmOUIbP3Pm
 h5v7+fk8gsdfh5TS9fPF3JY9XM34BfRkgBzETwnKu9jiXW4J1EyrK0nQvaOcy405+2
 PjjaDg6kkI2XUPBKdr1GTCGJVMUwCLkYmFEOUKhw=
Authentication-Results: smtp1o.mail.yandex.net; dkim=pass header.i=@yandex.ru
X-Yandex-ForeignMX: US
X-Yandex-Suid-Status: 1 0,1 0
Subject: Re: bug#27442: Un-obsolete x-clipboard-yank, or provide analogous
 functional
To: Eli Zaretskii <eliz@HIDDEN>
References: <ad2453ab-605d-7964-900c-0b1d0513b48c@HIDDEN>
 <83r2ydupg7.fsf@HIDDEN>
From: Constantine Kharlamov <Hi-Angel@HIDDEN>
Message-ID: <9b98217a-be79-56ed-16a9-0c15622111c5@HIDDEN>
Date: Wed, 21 Jun 2017 22:55:58 +0300
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.2.0
MIME-Version: 1.0
In-Reply-To: <83r2ydupg7.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 27442
X-Mailman-Approved-At: Wed, 21 Jun 2017 15:57:41 -0400
Cc: 27442 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

On 21.06.2017 22:10, Eli Zaretskii wrote:
>> From: Constantine Kharlamov <Hi-Angel@HIDDEN>
>> Date: Wed, 21 Jun 2017 17:29:40 +0300
>>
>> x-clipboard-yank always uses clipboard content, which is exactly what I need. I.e. if I set (setq select-enable-clipboard nil) to not clutter my clipboard with kills, I only get content from the clipboard. (don't get me wrong, kill-ring is very cool, and I extensively use it in evil-mode. But I prefer to explicitly point when I want a content in the clipboard, which happens an order of magnitude rarer than usage of kill-ring).
>>
>> clipboard-yank uses a kill-ring instead.
> 
> I see the same call to 'yank' in both clipboard-yank and
> x-clipboard-yank, so I'm not sure I understand what difference in
> behavior you see (you also didn't say which version of Emacs did you
> use).

Sorry. It's 26.0.50, Archlinux, emacs-gitᴬᵁᴿ. However the first time I saw the problem at least 1.5 year ago on Ubuntu. It's just that I never reported, but today I started worrying.

> Can you show a reproducible recipe starting from "emacs -Q"
> which could be used to see the problem?
> 
> Thanks.

Well, for collecting the steps turned out `(clipboard-yank)` might have another subtle bug. But what I said still holds. Steps:

1. start `emacs -Q`
2. Press M-: to execute `(setq select-enable-clipboard nil)`
3. Copy a text in the system, i.e. outside of Emacs.
4. Press M-: to execute `(clipboard-yank)` (you'll get at the point a content from system clipboard)
5. Press M-< M-d (so now you have the word ";; This" in kill-ring)
6. Press M-: to execute `(clipboard-yank)`

	You will see ";; This" got pasted at point, not the value in the system clipboard.

7. Press M-: to execute `(x-clipboard-yank)`

	You will see content from the system clipboard got pasted at point.

The subtle bug I just found is an inconsistent behavior: if you skip the 4-th step, then at 6-th step you'll see the content from system clipboard. Which is actually what I'd want (i.e. the system clipboard content, not the inconsistent behavior, of course), but in long-term usage it pastes from kill-ring.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27442; Package emacs. Full text available.

Message received at 27442 <at> debbugs.gnu.org:


Received: (at 27442) by debbugs.gnu.org; 21 Jun 2017 19:11:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 21 15:11:04 2017
Received: from localhost ([127.0.0.1]:60218 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dNl1s-00006L-Jk
	for submit <at> debbugs.gnu.org; Wed, 21 Jun 2017 15:11:04 -0400
Received: from eggs.gnu.org ([208.118.235.92]:55092)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1dNl1r-00005s-5P
 for 27442 <at> debbugs.gnu.org; Wed, 21 Jun 2017 15:11:03 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1dNl1g-0002AX-4B
 for 27442 <at> debbugs.gnu.org; Wed, 21 Jun 2017 15:10:57 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:32977)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1dNl1g-0002AT-0N; Wed, 21 Jun 2017 15:10:52 -0400
Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3183
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1dNl1d-00056J-Dr; Wed, 21 Jun 2017 15:10:51 -0400
Date: Wed, 21 Jun 2017 22:10:32 +0300
Message-Id: <83r2ydupg7.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Constantine Kharlamov <Hi-Angel@HIDDEN>
In-reply-to: <ad2453ab-605d-7964-900c-0b1d0513b48c@HIDDEN> (message from
 Constantine Kharlamov on Wed, 21 Jun 2017 17:29:40 +0300)
Subject: Re: bug#27442: Un-obsolete x-clipboard-yank,
 or provide analogous functional
References: <ad2453ab-605d-7964-900c-0b1d0513b48c@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 27442
Cc: 27442 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

> From: Constantine Kharlamov <Hi-Angel@HIDDEN>
> Date: Wed, 21 Jun 2017 17:29:40 +0300
> 
> x-clipboard-yank always uses clipboard content, which is exactly what I need. I.e. if I set (setq select-enable-clipboard nil) to not clutter my clipboard with kills, I only get content from the clipboard. (don't get me wrong, kill-ring is very cool, and I extensively use it in evil-mode. But I prefer to explicitly point when I want a content in the clipboard, which happens an order of magnitude rarer than usage of kill-ring).
> 
> clipboard-yank uses a kill-ring instead.

I see the same call to 'yank' in both clipboard-yank and
x-clipboard-yank, so I'm not sure I understand what difference in
behavior you see (you also didn't say which version of Emacs did you
use).  Can you show a reproducible recipe starting from "emacs -Q"
which could be used to see the problem?

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27442; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 21 Jun 2017 15:32:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 21 11:32:10 2017
Received: from localhost ([127.0.0.1]:60100 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dNhc1-0001p5-SU
	for submit <at> debbugs.gnu.org; Wed, 21 Jun 2017 11:32:10 -0400
Received: from eggs.gnu.org ([208.118.235.92]:41980)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <Hi-Angel@HIDDEN>) id 1dNgdq-0000Pr-Jg
 for submit <at> debbugs.gnu.org; Wed, 21 Jun 2017 10:29:59 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <Hi-Angel@HIDDEN>) id 1dNgdk-0005s6-CK
 for submit <at> debbugs.gnu.org; Wed, 21 Jun 2017 10:29:53 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
 T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:49031)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <Hi-Angel@HIDDEN>) id 1dNgdk-0005s1-96
 for submit <at> debbugs.gnu.org; Wed, 21 Jun 2017 10:29:52 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:32937)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <Hi-Angel@HIDDEN>) id 1dNgdj-0007Es-BF
 for bug-gnu-emacs@HIDDEN; Wed, 21 Jun 2017 10:29:52 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <Hi-Angel@HIDDEN>) id 1dNgdg-0005qO-8p
 for bug-gnu-emacs@HIDDEN; Wed, 21 Jun 2017 10:29:51 -0400
Received: from forward22h.cmail.yandex.net ([87.250.230.53]:33002)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <Hi-Angel@HIDDEN>) id 1dNgdf-0005nq-VE
 for bug-gnu-emacs@HIDDEN; Wed, 21 Jun 2017 10:29:48 -0400
Received: from smtp1j.mail.yandex.net (smtp1j.mail.yandex.net
 [IPv6:2a02:6b8:0:801::ab])
 by forward22h.cmail.yandex.net (Yandex) with ESMTP id EDA5C2120F
 for <bug-gnu-emacs@HIDDEN>; Wed, 21 Jun 2017 17:29:44 +0300 (MSK)
Received: from smtp1j.mail.yandex.net (localhost.localdomain [127.0.0.1])
 by smtp1j.mail.yandex.net (Yandex) with ESMTP id 6652C3C8162A
 for <bug-gnu-emacs@HIDDEN>; Wed, 21 Jun 2017 17:29:41 +0300 (MSK)
Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id
 5NEEd2ripb-TesmjdCf; Wed, 21 Jun 2017 17:29:40 +0300
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client certificate not present)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail;
 t=1498055380; bh=8e7wyn71Z2fb6pYWLA/9szMTOgus1bnSn2dUqk+Ffrw=;
 h=To:From:Subject:Message-ID:Date;
 b=i9yEmqYgpd1hCTu1hAYQ3GiP2ocDUKaTkCRQyarltvNx75DZxoeOZWTcUuTYnmzKA
 kqE2RRp91A7z5ZWEr+3qU9qa57CaSeL7OBs5tRGW1AxSTKspNJPNIOraO4tM7DO/Xg
 4Oc//+s0ZIXIDsqvOjdbsJ98loPItSf4kjuXgg44=
Authentication-Results: smtp1j.mail.yandex.net; dkim=pass header.i=@yandex.ru
X-Yandex-Suid-Status: 1 0
To: bug-gnu-emacs@HIDDEN
From: Constantine Kharlamov <Hi-Angel@HIDDEN>
Subject: Un-obsolete x-clipboard-yank, or provide analogous functional
Message-ID: <ad2453ab-605d-7964-900c-0b1d0513b48c@HIDDEN>
Date: Wed, 21 Jun 2017 17:29:40 +0300
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.2.0
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Wed, 21 Jun 2017 11:32:09 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

Emacs says: "x-clipboard-yank is obsolete since 25.1; use =E2=80=98clipbo=
ard-yank=E2=80=99 instead." The problem is that clipboard-yank doesn't wo=
rk same way as x-clipboard-yank does.

x-clipboard-yank always uses clipboard content, which is exactly what I n=
eed. I.e. if I set (setq select-enable-clipboard nil) to not clutter my c=
lipboard with kills, I only get content from the clipboard. (don't get me=
 wrong, kill-ring is very cool, and I extensively use it in evil-mode. Bu=
t I prefer to explicitly point when I want a content in the clipboard, wh=
ich happens an order of magnitude rarer than usage of kill-ring).

clipboard-yank uses a kill-ring instead. So if I set (setq select-enable-=
clipboard nil), every usage of the function gives me a random text that m=
ay or may not be in the clipboard.




Acknowledgement sent to Constantine Kharlamov <Hi-Angel@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#27442; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.