From: chris <inkbottle007@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: Sun, 30 Jan 2022 04:12:51 +0100 [thread overview]
Message-ID: <3701125.3ICyicTkgz@pluto> (raw)
In-Reply-To: <st0o8f$17kj$1@ciao.gmane.io>
On Friday, 28 January 2022 13:40:45 CET Max Nikulin wrote:
> 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
Yes, yes, possibly
Just something I've noticed, which is obvious, but I didn't thought about, and
which has probably no bearing:
1- click on the bookmarklet
2- `C-c C-l Ret Ret` in an org-buffer, so the link is created (this step not
necessary though)
3- if you do `C-y` you can see the URL is in the kill-ring
But obviously there is no reason for this URL to be also in the Wayland (or
x11) clipboard? (there is no law of nature saying that what is in emacs kill-
ring must necessarily also be in wayland clipboard. I think there is a law of
nature for the other way around though)
In any case, in the case of Kde/Kwin/Wayland, it is not copied in the Wayland
clipboard.
Maybe it's in the description of org-protocol/store-link that the URL should
be copied in emacs kill-ring, in any case, it is.
But no it doesn't show in the kde/wayland clipboard (and why would it).
>
> > 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/19dcb237b5b02b36580294ab30912
> > 4f346a66024/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?
Right, right, right
I was only trying to see if there was something obviously sticking out about
the cut and paste issue.
So you say "new style URIs are parsed before they are passed to subprotocol
handler": so, no worries then.
Thanks a lot for saying so. I've been searching but haven't found were they
were parsed. I've probably haven't searched enough, and anyway it's of no
bearing. Thanks again.
next prev parent reply other threads:[~2022-01-30 3:13 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 [this message]
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
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=3701125.3ICyicTkgz@pluto \
--to=inkbottle007@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).