emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Max Nikulin <manikulin@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: cut and paste not working after xdg-open "org-protocol://store-link?url=URL&title=TITLE"
Date: Mon, 31 Jan 2022 23:29:28 +0700	[thread overview]
Message-ID: <st92pa$nj2$1@ciao.gmane.io> (raw)
In-Reply-To: <87sft4g0zp.fsf@localhost>

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.

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, 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.

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

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")

CLIPBOARD is changed, PRIMARY selection is not, it can be tuned in Emacs 
settings. I like the default ones.
$ wl-paste
kill-new from Emacs
$ wl-paste --primary
Just select in Firefox



  parent reply	other threads:[~2022-01-31 16:42 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-27  0:03 cut and paste not working after xdg-open "org-protocol://store-link?url=URL&title=TITLE" chris
2022-01-28 12:40 ` Max Nikulin
2022-01-30  3:12   ` chris
2022-01-30  3:36     ` Ihor Radchenko
2022-01-30 18:38       ` chris
2022-01-31  1:14         ` Ihor Radchenko
2022-01-31  2:13           ` chris
2022-01-31  3:28             ` Ihor Radchenko
2022-01-31  3:43               ` chris
2022-01-31  3:49                 ` chris
2022-01-31  4:00                   ` chris
2022-01-31  6:47                     ` Tim Cross
2022-01-31 16:29           ` Max Nikulin [this message]
2022-02-01  5:48             ` chris
2022-02-01  5:57               ` chris
2022-02-02 16:49                 ` Max Nikulin
2022-01-30  8:31     ` Max Nikulin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='st92pa$nj2$1@ciao.gmane.io' \
    --to=manikulin@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).