[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: |
Fri, 28 Jan 2022 19:40:45 +0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 |
On 27/01/2022 07:03, chris wrote:
First: `xdg-open "org-protocol://store-link?url=URL&title=TITLE"` from a
terminal.
Then `M-x org-insert-link` in emacs, or not (it makes no difference).
Then cut-and-paste from non-emacs-application (e.g., Kde's Konsole, or
Firefox) to emacs.
When doing `C-y` what it pastes is "URL", not what I have copied from
Firefox.
Just a data point: I can not reproduce it with X11, emacs-26.3, and Org
from git main HEAD. Maybe I will try with emacs-27 and Wayland in a few
days.
emacs -Q -L ~/src/org-mode/lisp/ \
-l org-protocol --eval '(server-start)' test.org
emacsclient 'org-protocol:/store-link?url=http://o.rg/&title=Tt1'
copy from firefox
C-y (org-yank) in Emacs pastes text that I copied from firefox.
In some aspects your problem looks similar to:
Max Nikulin. [PATCH] [BUG] org.el: Fix first call of `org-paste-subtree'
Mon, 29 Nov 2021 19:02:35 +0700.
https://list.orgmode.org/so2fh1$10kj$1@ciao.gmane.io
But why is there a `nil` here:
https://github.com/emacs-mirror/emacs/blob/19dcb237/lisp/org/org-protocol.el#L467
<https://github.com/emacs-mirror/emacs/blob/19dcb237b5b02b36580294ab309124f346a66024/lisp/org/org-protocol.el#L467>
And why is it working at all from `xdg-open
"org-protocol://store-link?url=URL&title=TITLE"`, with a `nil` in that
position?
Note: `(org-protocol-store-link "U/T")` works, `(org-protocol-store-link
"url=U&title=T")` doesn't work. Produces link `[[url=U&title=T]]`
instead of `[[U][T]]`.
What is the problem with nil there? New-style URIs are parsed before
they are passed to subprotocol handlers. Why are you trying to call
org-protocol-store-link directly?
- cut and paste not working after xdg-open "org-protocol://store-link?url=URL&title=TITLE", chris, 2022/01/26
- Re: cut and paste not working after xdg-open "org-protocol://store-link?url=URL&title=TITLE",
Max Nikulin <=
- Re: cut and paste not working after xdg-open "org-protocol://store-link?url=URL&title=TITLE", chris, 2022/01/29
- Re: cut and paste not working after xdg-open "org-protocol://store-link?url=URL&title=TITLE", Ihor Radchenko, 2022/01/29
- Re: cut and paste not working after xdg-open "org-protocol://store-link?url=URL&title=TITLE", chris, 2022/01/30
- Re: cut and paste not working after xdg-open "org-protocol://store-link?url=URL&title=TITLE", Ihor Radchenko, 2022/01/30
- Re: cut and paste not working after xdg-open "org-protocol://store-link?url=URL&title=TITLE", chris, 2022/01/30
- Re: cut and paste not working after xdg-open "org-protocol://store-link?url=URL&title=TITLE", Ihor Radchenko, 2022/01/30
- Re: cut and paste not working after xdg-open "org-protocol://store-link?url=URL&title=TITLE", chris, 2022/01/30
- Re: cut and paste not working after xdg-open "org-protocol://store-link?url=URL&title=TITLE", chris, 2022/01/30
- Re: cut and paste not working after xdg-open "org-protocol://store-link?url=URL&title=TITLE", chris, 2022/01/30
- Re: cut and paste not working after xdg-open "org-protocol://store-link?url=URL&title=TITLE", Tim Cross, 2022/01/31