From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id kAxkGPTK+GG3XgEAgWs5BA (envelope-from ) for ; Tue, 01 Feb 2022 06:53:56 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id aCvuFPTK+GGsFwEAauVa8A (envelope-from ) for ; Tue, 01 Feb 2022 06:53:56 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9E02D24677 for ; Tue, 1 Feb 2022 06:53:55 +0100 (CET) Received: from localhost ([::1]:45240 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nEm70-0007IO-MI for larch@yhetil.org; Tue, 01 Feb 2022 00:53:54 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58456) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nEm2H-0007I8-1s for emacs-orgmode@gnu.org; Tue, 01 Feb 2022 00:49:01 -0500 Received: from [2a00:1450:4864:20::32f] (port=35735 helo=mail-wm1-x32f.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nEm2E-0001DG-Se for emacs-orgmode@gnu.org; Tue, 01 Feb 2022 00:49:00 -0500 Received: by mail-wm1-x32f.google.com with SMTP id f80-20020a1c1f53000000b0035399b8bedcso679715wmf.0 for ; Mon, 31 Jan 2022 21:48:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=dsAyFSIQlT8YHSgsPZQ875VztwvS7qitQdJG14eXoTE=; b=JmG7ds9/cdpCmYxrNlUxkgWvwWjSAIuIF2/KoTDksi7OpgdeHbL7mM3YOeZw+LF05H UFCVuHet8As9i7Ioprveotu7KIno43F7h72z9Sa2G6Xran40D2xUA+5qXlY++jZC/0my U4AMAUYzjt2bzm0q8CkFYIOJhtmKMyqXAqED+hbmshlPeaCfCkE+zvsA2osxrQ2uNgoV ingfmNUb0AwImwAba1FJNuCdua472ojwBfMuEa6QqtnSYtk4R+UwrulHIiRusW8iX/Y0 GR5XZW6RIE+xXyzr5HPOeweWXebvtnue8Z3iFvu58+pBVeoX0ZjG36+xtGJw74bg0Kq+ r32w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dsAyFSIQlT8YHSgsPZQ875VztwvS7qitQdJG14eXoTE=; b=Zkezf5BNiXftUZ5mwCqWdRQonaWFrlAOUkkp+KrdOlk4cIaxa+XiRJtqomJ/jTwx6f PvZo3kQRDN3S1Bb3UkPp1g2pirwcfzrs1Alrp/Hx1KAZ93QQh7row9PLe3ipuGKHHY5z 9Lm8n3HNgtidMV+lzLgLb/pg0An+oC7LNX/EcJIYU3le6q1qIV13/0r4iMUDhWlOmKMl /2734zNKiPeU315FX6vESyLr43EgASCqKkWI5W6r1ZL7Au6K3yvmnW+xEHXB83ptZUUc nvguGoKA0K9kYwP0Pp1xR/yaW2p7U2raD6dVwxQyCwoVi86aw0jEwPVkek76yWcw17zv 4glQ== X-Gm-Message-State: AOAM530CAf0127wizxHjpp4bMKvF5RL7ouxJAR+KlXTHABVDND64zJRV nrRjreBmXWVHwRB5L+MXYcvoRj7v/Hc= X-Google-Smtp-Source: ABdhPJz0griQiM8Jl725FSslxiWnY8Dtm+4OLA9y9JLNtYsDP9s/cnnt75qOtKFjIIK4O+jXQqKpeg== X-Received: by 2002:a1c:2b01:: with SMTP id r1mr316977wmr.63.1643694536493; Mon, 31 Jan 2022 21:48:56 -0800 (PST) Received: from pluto.localnet (aaubervilliers-654-1-103-66.w86-212.abo.wanadoo.fr. [86.212.235.66]) by smtp.gmail.com with ESMTPSA id o15sm1275987wms.9.2022.01.31.21.48.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jan 2022 21:48:56 -0800 (PST) From: chris To: emacs-orgmode@gnu.org Subject: Re: cut and paste not working after xdg-open "org-protocol://store-link?url=URL&title=TITLE" Date: Tue, 01 Feb 2022 06:48:54 +0100 Message-ID: <3845668.FWhFyR7r9r@pluto> In-Reply-To: References: <1902025.jDVfpnRRgo@pluto> <87sft4g0zp.fsf@localhost> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="nextPart2071402.K4lCG3CaPc" Content-Transfer-Encoding: 7Bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::32f (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=inkbottle007@gmail.com; helo=mail-wm1-x32f.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1643694836; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=dsAyFSIQlT8YHSgsPZQ875VztwvS7qitQdJG14eXoTE=; b=cWCcXVKjudzmtVO7uti+P2ZmKSjzV2dABc6p+2lwBXq+dOZnrAY+ZTTnkWk4m8BggCJUYW agZJYLSlWj7XXmr/rSxSuQ+2cIv5vzMocGmLB21xb7LJ3polTw6po4HJmxDgjdWLR5uoWO A86uEGZqoGYHz5OAzbEygjp7NjIS3IQbWhsS5Kmg6Wx/ayBkWwRMoFpo+OjrPp9vruTKlQ hhNZNX18FOEAWdgdqKvxPgDXuBQfL8LwwFPLKbcTvH277kV+Nl5CpFVMVg3Ji/6d/gbq3V eg7LtLn8lTWW7kE0O+CYpkWr0rUXsOyR7bvusHCbVp7IsRxE7gTXvZ+54Flg3Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1643694836; a=rsa-sha256; cv=none; b=ooFGVZHWi4IrVqtDuzyes1hzKBQXrUSRY93fUn/2HpiVkerGoTEIkB1vWGzH4OPmvQJ2UT 69wgEMcN8iaMr80D4e8CN/y0Opm/o2pgPHbYGx+2l+FaT4yM+Fq/y5N/wRo4ybw//5hnUs choCZ+qJmjdCtAgY9cUDJmndQjNp5FPRkB4a8wRO2iq5+f5zwrRu2Uk3uY/CbYQFqcSnVt Y7HDh/bxMq8ypoy1grEgz5W/GhfI2DfxE0vNajl0wJ3N1HASfPG+DofbmTi0LXzMjFWfue HYKHbsgKAdVUHz5DDGQiPV4b5acF+iaaJ7CU2bQ4PgxXrxaHHStn8pZm7JuS7g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="JmG7ds9/"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.33 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="JmG7ds9/"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 9E02D24677 X-Spam-Score: -2.33 X-Migadu-Scanner: scn1.migadu.com X-TUID: 6Hd3Pqy/Qkp9 This is a multi-part message in MIME format. --nextPart2071402.K4lCG3CaPc Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" On Monday, 31 January 2022 17:29:28 CET Max Nikulin wrote: > On 31/01/2022 08:14, Ihor Radchenko wrote: > > chris writes: > > > > I am not using Wayland. However, if I just do (kill-new "test") in X and > > my select-enable-primary is nil (default) - "test" will not go to my X > > clipboard. It is the default behaviour of Emacs in X that has nothing to > > do with Org mode. This quote above is not from me (Chris), I think it's from Ihor, I just say that to try not to add to confusion ;) I myself, am using Wayland. > Ihor, please, do not add more confusion to this obscure issue. > `select-enable-primary' controls PRIMARY selection, not CLIPBOARD. > `select-enable-clipboard' is an independent variable. > > Chris, did you tune clipboard manager in KDE? This kind of software may > cause quite peculiar behavior... So, on debian/sid/kde/wayland, I've clicked on "configure clipboard" in the default plasma panel: I can see "ignore selection" is selected. I don't like "primary selection", I think it's messy. > > So, do not confuse PRIMARY selection and CLIPBOARD. Unlike MS Windows, > X11 has several selection (and legacy cut buffers). I do not know the > full story, but it seems that wayland developers decided that it is more > secure to have just clipboard, but they did not sustain pressure of > users who really like that "hard to discover feature": just select some > text with mouse without additional hotkeys and paste it using middle click. Yes, you inadvertently select text, and inadvertently paste it: that's legacy for you. Well, look at that: https://bugs.kde.org/show_bug.cgi?id=441668[1] "Recently middle-click pasting got implemented for the Wayland platform. However, this feature could be regarded as an annoyance due to the risk of inadvertent pasting.", etc. So "selection ignored by the clipboard" according to kwin/wayland seems to mean "user can't see it when they look in the clipboard" But it's fully working all right and you just can't disable it. Awesome. So yeah, debian-sid-kde-plasma-wayland: There is both "primary selection" and "clipboard" and you just can't disable "primary selection". At least according to the above kde bug report. > > Ububntu-21.10 impish, gnome, wayland, Emacs-27.1. I am aware that KDE > may have rather different implementation related to wayland protocol and > something may change in Emacs since the released version. I just have VM > with such configuration. > > New session, empty selection and clipboard: > $ wl-paste --list-types > No selection > $ wl-paste --primary --list-types > No selection > > Select a word in terminal using mouse: > $ wl-paste --primary --list-types > text/plain > text/plain;charset=utf-8 > STRING > TEXT > COMPOUND_TEXT > UTF8_STRING > $ wl-paste --list-types > No selection > > [Ctrl+Shift+V] to copy selection to clipboard > $ wl-paste --primary --list-types > text/plain > text/plain;charset=utf-8 > STRING > TEXT > COMPOUND_TEXT > UTF8_STRING > $ wl-paste --list-types > text/plain > text/plain;charset=utf-8 > STRING > TEXT > COMPOUND_TEXT > UTF8_STRING --nextPart2071402.K4lCG3CaPc Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="UTF-8"

On Monday, 31 January 2022 17:29:28 CET Max Nikulin wrote:

>= ; On 31/01/2022 08:14, Ihor Radchenko wrote:

>= ; > chris writes:

>= ; >

>= ; > I am not using Wayland. However, if I just do (kill-new "test&q= uot;) in X and

>= ; > my select-enable-primary is nil (default) - "test" will no= t go to my X

>= ; > clipboard. It is the default behaviour of Emacs in X that has nothin= g to

>= ; > do with Org mode.


This quote above is not from me (Chris), I think it's from Ihor, I just = say that to try not to add to confusion ;)

I m= yself, am using Wayland.


> Ihor, please, do not add more confusion to this obscure issue.

>= ; `select-enable-primary' controls PRIMARY selection, not CLIPBOARD.

>= ; `select-enable-clipboard' is an independent variable.

>= ;

>= ; Chris, did you tune clipboard manager in KDE? This kind of software may

>= ; cause quite peculiar behavior...


So, on debian/sid/kde/wayland, I've clicked on "configure clipboard= " in the default plasma panel:

I c= an see "ignore selection" is selected. I don't like "primary= selection", I think it's messy.


>

>= ; So, do not confuse PRIMARY selection and CLIPBOARD. Unlike MS Windows,

>= ; X11 has several selection (and legacy cut buffers). I do not know the

>= ; full story, but it seems that wayland developers decided that it is more<= /p>

>= ; secure to have just clipboard, but they did not sustain pressure of

>= ; users who really like that "hard to discover feature": just sel= ect some

>= ; text with mouse without additional hotkeys and paste it using middle clic= k.


Yes, you inadvertently select text, and inadvertently paste it: that's l= egacy for you.


Well, look at that:

https://bugs.kde.org= /show_bug.cgi?id=3D441668

&qu= ot;Recently middle-click pasting g= ot implemented for the Wayland platform. However, this feature could be reg= arded as an annoyance due to the risk of inadvertent pasting.", etc.


So "selection ignored by the clipboard" according to kwin/wayl= and seems to mean "user can't see it when they look in the clipboard&q= uot;

But= it's fully working all right and you just can't disable it.

Awe= some.


So yeah, debian-sid-kde-plasma-wayland:

The= re is both "primary selection"=C2=A0 and "clipboard" an= d you just can't disable "primary selection".


At least according to the above kde bug report.


>

>= ; Ububntu-21.10 impish, gnome, wayland, Emacs-27.1. I am aware that KDE

>= ; may have rather different implementation related to wayland protocol and<= /p>

>= ; something may change in Emacs since the released version. I just have VM<= /p>

>= ; with such configuration.

>= ;

>= ; New session, empty selection and clipboard:

>= ; $ wl-paste --list-types

>= ; No selection

>= ; $ wl-paste --primary --list-types

>= ; No selection

>= ;

>= ; Select a word in terminal using mouse:

>= ; $ wl-paste --primary --list-types

>= ; text/plain

>= ; text/plain;charset=3Dutf-8

>= ; STRING

>= ; TEXT

>= ; COMPOUND_TEXT

>= ; UTF8_STRING

>= ; $ wl-paste --list-types

>= ; No selection

>= ;

>= ; [Ctrl+Shift+V] to copy selection to clipboard

>= ; $ wl-paste --primary --list-types

>= ; text/plain

>= ; text/plain;charset=3Dutf-8

>= ; STRING

>= ; TEXT

>= ; COMPOUND_TEXT

>= ; UTF8_STRING

>= ; $ wl-paste --list-types

>= ; text/plain

>= ; text/plain;charset=3Dutf-8

>= ; STRING

>= ; TEXT

>= ; COMPOUND_TEXT

>= ; UTF8_STRING

>= ;

>= ; Let's copy some text from Firefox and then select another text

>= ; but do not copy it:

>= ; $ wl-paste

>= ; Copy from Firefox

>= ; $ wl-paste --primary

>= ; Just select in Firefox

>= ;

>= ; So paste and insert using middle click are not synchronized now.

>= ;

>= ; Execute the following in Emacs:

>= ; (kill-new "kill-new from Emacs")


Okay, at this point, we have seen, from the kde bug above (https://bugs.kde.org/show_bug.cgi?id=3D441668), that things are a little bit in a mess, right now.

 

So = when I use `wl-paste`, `wl-paste --primary`, `wl-paste --list-types`, `wl-p= aste --primary --list-types`, I've got results whose logic is following the= logic of your examples, with "primary selection" and "clipb= oard" living their separated lives, and not being synchronized, etc.

But when I use `(kill-new "kill-new from Emacs")`, I've got re= sults "way superior to yours".

 

On = the one hand, if I do:

`~/= path/emacsclient --create-frame --alte= rn
ate-editor=3D""`
Then go to `*s= cratch*`

The= n `(kill-new "kill-new from Emacs")`

The= n `C-y` gives `kill-new from Emacs`, and,

$ w= l-paste
kill-new from Emacs
$ wl-paste --primary
(kill-ne= w "kill-new from Emacs")

On = the other hand, if I do `~/path/emacsclient -e "(kill-new \"test5= 23
\")"`, I get:

$ w= l-paste --primary; wl-paste
emacsclient -e "(kill-new \"tes= t523\")"
emacsclient -e "(kill-new \"test523\&quo= t;)"
And if I go to the emacsclient actual frame that I've kept o= pen from the example above, and do `C-y`, I get:

tes= t523


So on my system,

`em= acsclient -e "(kill-new \"test523\")"`

And=

`(k= ill-new "test523")` executed in a emacsclient frame, in `*scratch= *`, with `C-j`.


They don't agree.


And when I do one version, then the other version, then the first versio= n, and try `wl-paste`, very quickly I get a `wl-paste` command that doesn't= return, and that I have to stop with "C-c in a terminal let's not get= confused".

 

So = I think that settles things on my side: it's a mess, let's burry it, forget= about it.

>= ; CLIPBOARD is changed, PRIMARY selection is not, it can be tuned in Emacs<= /p>

>= ; settings.=C2=A0I like the default ones.

>= ; $ wl-paste

>= ; kill-new from Emacs

>= ; $ wl-paste --primary

>= ; Just select in Firefox

--nextPart2071402.K4lCG3CaPc--