From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Rose Subject: Re: Org-protocol / Chrome on Linux Date: Thu, 30 Sep 2010 17:56:17 +0200 Message-ID: <87aamzrzry.fsf@gmx.de> References: <87aao21i92.fsf@gmx.de> <87hbh7s0da.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=51722 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P1LUv-0001X0-5s for emacs-orgmode@gnu.org; Thu, 30 Sep 2010 11:56:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1P1LUd-0003rJ-QV for emacs-orgmode@gnu.org; Thu, 30 Sep 2010 11:56:40 -0400 Received: from mailout-de.gmx.net ([213.165.64.23]:34603 helo=mail.gmx.net) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1P1LUd-0003qq-Ej for emacs-orgmode@gnu.org; Thu, 30 Sep 2010 11:56:23 -0400 In-Reply-To: <87hbh7s0da.fsf@gmx.de> (Sebastian Rose's message of "Thu, 30 Sep 2010 17:43:29 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Mattias =?utf-8?Q?J=C3=A4mting?= Cc: emacs-orgmode Sebastian Rose writes: > Mattias J=C3=A4mting writes: >> Yes i'm running a pretty standard Ubuntu 10.04 setup. >> >> I managed to get it working on chrome by removing the >> encodeURIComponent command on location.href. >> >> I could simulate it in the terminal like this. >> >> mattias@helium:~$ xdg-open org-protocol://capture://http%3A%2F%2Forgmode= .org >> Error showing URL: Operation not supported >> mattias@helium:~$ xdg-open org-protocol://capture://http://orgmode.org >> mattias@helium:~$ (worked) >> >> Strange that it worked in FF. Maybe Chrome and FF encodes URIs different= ly? > > > Ooops! > > I just was going to blame Google. > > Looking into the ECMA standard, I found this: > > 15.1.3 URI Handling Function Properties > > ... ... > > A URI is composed of a sequence of components separated by > component separators. The general form=20 > is: > Scheme : First / Second ; Third ? Fourth > > where the italicised names represent components and the =E2=80=9C:= =E2=80=9D, =E2=80=9C/=E2=80=9D, > =E2=80=9C;=E2=80=9D and =E2=80=9C?=E2=80=9D are reserved character= s used as separators. The > encodeURI and decodeURI functions are intended to work with > complete URIs; they assume that any reserved characters in the > URI are intended to have special meaning and so are not > encoded. The encodeURIComponent and decodeURIComponent functions > are intended to work with the individual component parts of a > URI; they assume that any reserved characters represent text and > so must be encoded so that they are not interpreted as reserved > characters when the component is part of a complete URI. > > > That document states "encodeURI" is to be used with complete URIs (as > the name says...). Funny. Chrome is the only browser that works like > that :) > > I'll go and adjust the docs. > > > Thanks for your Report!! > Actually --- errr --- there is nothing to adjust. The docs are exactly right.=20 This is because of some =C3=B6rfflkjsgs in xdg-open. No one ever said something about xdg-open. Org-protocol is supposed to work with emacsclient: mattias@helium:~$ emacsclient org-protocol://capture://http%3A%2F%2Forgmode= .org works. Sebastian