emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Aaron Ecay <aaronecay@gmail.com>
To: Sacha Chua <sacha@sachachua.com>, emacs-orgmode@gnu.org
Subject: Re: [PATCH] org-protocol: Allow optional port specification
Date: Thu, 03 Dec 2015 19:01:42 +0000	[thread overview]
Message-ID: <87bna7bbl5.fsf@gmail.com> (raw)
In-Reply-To: <87wpswrg7q.fsf@sachachua.com>

Hi Sacha,

Thanks for your patch.

2015ko abenudak 2an, Sacha Chua-ek idatzi zuen:
> 
> I was trying to get org-protocol to work on KDE Plasma 5.4.2. I set up
> my ~/.kde/share/kde4/services/org.protocol, but the standard
> org-protocol sample syntax:
> 
>    org-protocol://store-link://URL/TITLE
> 
> resulted in the error:
> 
>    Malformed URL
>    Port field was empty; source was "..."; scheme = "org-protocol",
>    host = "store-link", path = "// ..."
> 
> Modifying my Javascript to create links of the form:
> 
>    org-protocol://store-link:0//URL/TITLE

I think that the original format is an ad-hoc manipulation of the url
format which tries to pack two PROTOCOL:// sequences into one string.
Rather than adding a bogus port which just doubles down on this, a
better solution IMO would be to make org-protocol links valid urls in
another way, using the query string format:

org-protocol://store-link?url=[...]&title=[...]

This corresponds better to the url format: the protocol is org-protocol,
which determines emacs shall handle this link.  The location is
store-link, which indicates a handler function which is an element of
‘org-protocol-protocol-alist’, and the query string gives the arguments
to this function.

Does that make sense?

Aaron

-- 
Aaron Ecay

  parent reply	other threads:[~2015-12-03 19:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-02 16:02 [PATCH] org-protocol: Allow optional port specification Sacha Chua
2015-12-02 19:32 ` Rasmus
2015-12-03 19:01 ` Aaron Ecay [this message]
2015-12-04 22:55   ` [PATCH] org-protocol: Allow key=val&key2=value2-style URLs Sacha Chua
2015-12-05 13:35     ` Aaron Ecay
2015-12-07 17:52       ` Sacha Chua
2015-12-07 23:07         ` Sacha Chua
2015-12-18 21:49           ` Sacha Chua
2015-12-20 15:48             ` Nicolas Goaziou
2015-12-21 21:12               ` Sacha Chua
2015-12-22 12:45                 ` Nicolas Goaziou

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=87bna7bbl5.fsf@gmail.com \
    --to=aaronecay@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=sacha@sachachua.com \
    /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).