emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cut and paste not working after xdg-open "org-protocol://store-link?


From: Max Nikulin
Subject: Re: cut and paste not working after xdg-open "org-protocol://store-link?url=URL&title=TITLE"
Date: Wed, 2 Feb 2022 23:49:17 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0

On 01/02/2022 12:57, chris wrote:
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 agree that I forgot to remove "chris writes:" line since I did not put anything from your messages. However I believed it is clear enough that with such style your quotes would have one more ">" character at beginning of lines.

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.

Does it mean that you did something in settings to get clipboard&selection behavior more close to your expectations? Since I have klipper disabled, I do not remember its defaults and effects of its settings.

Well, look at that:
https://bugs.kde.org/show_bug.cgi?id=441668
"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.

Low quality touchpad that accidentally spits middle-click events should be a real pain. However I can not understand your phrase above.

On the one hand, if I do:
`~/path/emacsclient --create-frame --altern
ate-editor=""`
Then go to `*scratch*`
Then `(kill-new "kill-new from Emacs")`
Then `C-y` gives `kill-new from Emacs`, and,

C-y queries desktop clipboard or/and selection (depending on `select-enable-clipboard' and `select-enable-primary' values), so it may affect result of the following commands.

$ wl-paste
kill-new from Emacs
$ wl-paste --primary
(kill-new "kill-new from Emacs")

What is the source of '(kill-new "kill-new from Emacs")' text in PRIMARY selection? Did it survived since you selected it in the message to paste it to Emacs?

So on my system,
`emacsclient -e "(kill-new \"test523\")"`
And
`(kill-new "test523")` executed in a emacsclient frame, in `*scratch*`, with
`C-j`.

They don't agree.

Does it happen when klipper is not running? I do not know if it is possible to enable logging of clipboard and selection events to shed some light which application push content to them. Maybe application can be obtained from some "type" present in "wl-paste --list-types" output (and with --primary).

Even
   emacsclient -e select-enable-primary
   emacsclient -e select-enable-clipboard
may clarify things a bit.

So either
- clipboard manager does some fancy stuff (e.g. to make clipboard content available after application quit or to copy text from selection to clipboard or vice versa) and emacs is confused by such actions
- or pgtk emacs builds have some clipboard problems on wayland.

Till behavior of emacs+wayland+clipboard manager is clarified it is hard to make conclusions related to org-protocol behavior.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]