From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Constantine Kharlamov Newsgroups: gmane.emacs.bugs Subject: bug#27442: Un-obsolete x-clipboard-yank, or provide analogous functional Date: Wed, 21 Jun 2017 22:55:58 +0300 Message-ID: <9b98217a-be79-56ed-16a9-0c15622111c5@yandex.ru> References: <83r2ydupg7.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1498075093 20209 195.159.176.226 (21 Jun 2017 19:58:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 21 Jun 2017 19:58:13 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 Cc: 27442@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jun 21 21:58:07 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNllP-0004yF-BQ for geb-bug-gnu-emacs@m.gmane.org; Wed, 21 Jun 2017 21:58:07 +0200 Original-Received: from localhost ([::1]:55730 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNllU-0008G1-91 for geb-bug-gnu-emacs@m.gmane.org; Wed, 21 Jun 2017 15:58:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55307) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNllP-0008Fv-0a for bug-gnu-emacs@gnu.org; Wed, 21 Jun 2017 15:58:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dNllK-00020V-5r for bug-gnu-emacs@gnu.org; Wed, 21 Jun 2017 15:58:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57610) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dNllK-000208-38 for bug-gnu-emacs@gnu.org; Wed, 21 Jun 2017 15:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dNllJ-00031R-SU for bug-gnu-emacs@gnu.org; Wed, 21 Jun 2017 15:58:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Constantine Kharlamov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 Jun 2017 19:58: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: Original-Received: via spool by 27442-submit@debbugs.gnu.org id=B27442.149807506211590 (code B ref 27442); Wed, 21 Jun 2017 19:58:01 +0000 Original-Received: (at 27442) by debbugs.gnu.org; 21 Jun 2017 19:57:42 +0000 Original-Received: from localhost ([127.0.0.1]:60287 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNlkz-00030r-G3 for submit@debbugs.gnu.org; Wed, 21 Jun 2017 15:57:41 -0400 Original-Received: from forward14m.cmail.yandex.net ([5.255.216.145]:56470) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNljU-0002yZ-8v for 27442@debbugs.gnu.org; Wed, 21 Jun 2017 15:56:09 -0400 Original-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) Original-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) Original-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 In-Reply-To: <83r2ydupg7.fsf@gnu.org> Content-Language: en-US X-Mailman-Approved-At: Wed, 21 Jun 2017 15:57:41 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:133804 Archived-At: On 21.06.2017 22:10, Eli Zaretskii wrote: >> From: Constantine Kharlamov >> 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.