From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aaron Ecay Subject: Re: [PATCH] org-protocol: Allow optional port specification Date: Thu, 03 Dec 2015 19:01:42 +0000 Message-ID: <87bna7bbl5.fsf@gmail.com> References: <87wpswrg7q.fsf@sachachua.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54388) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a4Z8X-0007sP-Na for emacs-orgmode@gnu.org; Thu, 03 Dec 2015 14:01:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a4Z8S-0007Ge-PM for emacs-orgmode@gnu.org; Thu, 03 Dec 2015 14:01:49 -0500 Received: from mail-wm0-x22b.google.com ([2a00:1450:400c:c09::22b]:38869) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a4Z8S-0007GH-KV for emacs-orgmode@gnu.org; Thu, 03 Dec 2015 14:01:44 -0500 Received: by wmec201 with SMTP id c201so35483830wme.1 for ; Thu, 03 Dec 2015 11:01:44 -0800 (PST) In-Reply-To: <87wpswrg7q.fsf@sachachua.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Sacha Chua , emacs-orgmode@gnu.org Hi Sacha, Thanks for your patch. 2015ko abenudak 2an, Sacha Chua-ek idatzi zuen: >=20 > 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: >=20 > org-protocol://store-link://URL/TITLE >=20 > resulted in the error: >=20 > Malformed URL > Port field was empty; source was "..."; scheme =3D "org-protocol", > host =3D "store-link", path =3D "// ..." >=20 > Modifying my Javascript to create links of the form: >=20 > 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=3D[...]&title=3D[...] 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 =E2=80=98org-protocol-protocol-alist=E2=80=99, and the query string gives t= he arguments to this function. Does that make sense? Aaron --=20 Aaron Ecay