From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: org-copy-visible does not work with x-select-enable-primary Date: Mon, 10 Sep 2018 20:27:35 +0300 Message-ID: <83in3dntyw.fsf@gnu.org> References: <23446.24671.697405.158351@frac.u-strasbg.fr> <83o9d5o1aa.fsf@gnu.org> <23446.35789.351055.673724@frac.u-strasbg.fr> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1536600361 12481 195.159.176.226 (10 Sep 2018 17:26:01 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 10 Sep 2018 17:26:01 +0000 (UTC) Cc: emacs-devel@gnu.org To: alain.cochard@unistra.fr Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 10 19:25:57 2018 Return-path: Envelope-to: ged-emacs-devel@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 1fzPwi-00039D-S9 for ged-emacs-devel@m.gmane.org; Mon, 10 Sep 2018 19:25:56 +0200 Original-Received: from localhost ([::1]:52960 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fzPyp-0007N5-9a for ged-emacs-devel@m.gmane.org; Mon, 10 Sep 2018 13:28:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48478) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fzPyF-0007Lt-Oi for emacs-devel@gnu.org; Mon, 10 Sep 2018 13:27:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fzPyC-0006ZP-L9 for emacs-devel@gnu.org; Mon, 10 Sep 2018 13:27:31 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45244) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fzPyC-0006ZG-HA; Mon, 10 Sep 2018 13:27:28 -0400 Original-Received: from [176.228.60.248] (port=4157 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fzPyC-0001gf-4f; Mon, 10 Sep 2018 13:27:28 -0400 In-reply-to: <23446.35789.351055.673724@frac.u-strasbg.fr> (Alain.Cochard@unistra.fr) 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-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:229646 Archived-At: > Date: Mon, 10 Sep 2018 17:20:45 +0200 > From: Alain.Cochard@unistra.fr > Cc: alain.cochard@unistra.fr, > emacs-devel@gnu.org > > > It will yank only "* foo" if you move the cursor in the Org buffer > > before yanking, or do anything else that removes the selection > > (i.e. removes the highlight due to selecting text). > > Are you sure?? Quite sure. But it doesn't matter much: what matters is that the offending string, "* foo\nbar", comes from the call to gui-selection-value. And once it gets into the kill-ring, you cannot undo that. org-copy-visible only handles what gets put into the kill ring when you invoke the command, it doesn't do anything what happens about invisible text when you yank. > (NB: With x-select-enable-primary false --default--, it yanks "* foo" > whether I remove the selection or not.) Yes, because without that, yanking doesn't consult the primary selection, it only consults the clipboard.