From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Mattias_J=C3=A4mting?= Subject: Org-protocol / Chrome on Linux Date: Tue, 31 Aug 2010 19:20:27 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0710909298==" Return-path: Received: from [140.186.70.92] (port=57846 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OqUW1-0007te-Bb for emacs-orgmode@gnu.org; Tue, 31 Aug 2010 13:21:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OqUVw-00018N-8g for emacs-orgmode@gnu.org; Tue, 31 Aug 2010 13:20:57 -0400 Received: from mail-vw0-f41.google.com ([209.85.212.41]:40828) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OqUVw-00017z-6W for emacs-orgmode@gnu.org; Tue, 31 Aug 2010 13:20:52 -0400 Received: by vws16 with SMTP id 16so7141564vws.0 for ; Tue, 31 Aug 2010 10:20:50 -0700 (PDT) Received: by qyk2 with SMTP id 2so7672811qyk.0 for ; Tue, 31 Aug 2010 10:20:47 -0700 (PDT) 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: emacs-orgmode --===============0710909298== Content-Type: multipart/alternative; boundary=0015175ccf36431fae048f21cd0a --0015175ccf36431fae048f21cd0a Content-Type: text/plain; charset=UTF-8 Hello, Have someone managed to get org-protocol ( http://orgmode.org/worg/org-contrib/org-protocol.php) working in chrome on linux (i use ubuntu) ? (I have tried; it works in firefox, but not in chrome - which is my preferred browser nowadays.) Please let my know if it works for you, or if you have any hints on setting it up. /Mattias --0015175ccf36431fae048f21cd0a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hello,

Have someone managed to get org-protocol (http://orgmode.org/worg= /org-contrib/org-protocol.php)=C2=A0working in chrome on linux (i use u= buntu) ?

(I have tried; it works in firefox, but not in chrome -= which is my preferred browser nowadays.)

Please l= et my know if it works for you, or if you have any hints on setting it up.<= /div>

/Mattias=C2=A0


--0015175ccf36431fae048f21cd0a-- --===============0710909298== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============0710909298==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Rose Subject: Re: Org-protocol / Chrome on Linux Date: Wed, 01 Sep 2010 01:20:57 +0200 Message-ID: <87aao21i92.fsf@gmx.de> References: 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=35620 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oqa8e-0007Lu-9N for emacs-orgmode@gnu.org; Tue, 31 Aug 2010 19:21:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oqa8Y-0003B5-Sw for emacs-orgmode@gnu.org; Tue, 31 Aug 2010 19:21:12 -0400 Received: from mailout-de.gmx.net ([213.165.64.23]:50384 helo=mail.gmx.net) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1Oqa8Y-0003Aw-DY for emacs-orgmode@gnu.org; Tue, 31 Aug 2010 19:21:06 -0400 In-Reply-To: ("Mattias =?utf-8?Q?J=C3=A4mting=22's?= message of "Tue, 31 Aug 2010 19:20:27 +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 Mattias J=C3=A4mting writes: > Hello, > > Have someone managed to get org-protocol ( > http://orgmode.org/worg/org-contrib/org-protocol.php) working in chrome on > linux (i use ubuntu) ? > > (I have tried; it works in firefox, but not in chrome - which is my > preferred browser nowadays.) > > Please let my know if it works for you, or if you have any hints on setti= ng > it up. Do you have Gnome libs installed? On a current GNU/Linux you could install protocol handlers for all programs as explained in http://orgmode.org/worg/org-contrib/org-protocol.php#sec-3_1 I don't know how to setup protocols with Chrome, but once you have done that, restarting Chrome and clicking one of the test links should work: http://orgmode.org/worg/org-contrib/org-protocol.php#sec-3_4 Please report back if you get it to work. Maybe you could even provide a little description we could add to the docs. HTH Sebastian (I will not use Chrome, since I don't want sites as trusted repos in my sources list, that uses the uninstall script in the *.deb package, to put the site into my sources list again.) From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Mattias_J=C3=A4mting?= Subject: Re: Org-protocol / Chrome on Linux Date: Thu, 30 Sep 2010 15:11:50 +0200 Message-ID: References: <87aao21i92.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=56403 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P1Iw0-0004Px-Lw for emacs-orgmode@gnu.org; Thu, 30 Sep 2010 09:12:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1P1Ivv-0004R1-KB for emacs-orgmode@gnu.org; Thu, 30 Sep 2010 09:12:28 -0400 Received: from mail-ey0-f169.google.com ([209.85.215.169]:49642) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P1Ivv-0004QR-CS for emacs-orgmode@gnu.org; Thu, 30 Sep 2010 09:12:23 -0400 Received: by eyh5 with SMTP id 5so872261eyh.0 for ; Thu, 30 Sep 2010 06:12:22 -0700 (PDT) Received: by yxk8 with SMTP id 8so1107930yxk.0 for ; Thu, 30 Sep 2010 06:12:13 -0700 (PDT) In-Reply-To: <87aao21i92.fsf@gmx.de> 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: Sebastian Rose Cc: emacs-orgmode 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.or= g 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 differently? Anyway. Works for me now so i'm pleased... /Mattias On Wed, Sep 1, 2010 at 01:20, Sebastian Rose wrote: > Mattias J=C3=A4mting writes: >> Hello, >> >> Have someone managed to get org-protocol ( >> http://orgmode.org/worg/org-contrib/org-protocol.php) working in chrome = on >> linux (i use ubuntu) ? >> >> (I have tried; it works in firefox, but not in chrome - which is my >> preferred browser nowadays.) >> >> Please let my know if it works for you, or if you have any hints on sett= ing >> it up. > > > Do you have Gnome libs installed? =C2=A0On a current GNU/Linux you could > install protocol handlers for all programs as explained in > > =C2=A0http://orgmode.org/worg/org-contrib/org-protocol.php#sec-3_1 > > > I don't know how to setup protocols with Chrome, but once you have done > that, restarting Chrome and clicking one of the test links should work: > > =C2=A0http://orgmode.org/worg/org-contrib/org-protocol.php#sec-3_4 > > > Please report back if you get it to work. =C2=A0 Maybe you could even pro= vide > a little description we could add to the docs. > > > HTH > > =C2=A0Sebastian > > > (I will not use Chrome, since I don't want sites as trusted repos in my > sources list, that uses the uninstall script in the *.deb package, to > put the site into my sources list again.) > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > > --=20 =C2=A0Mattias J=C3=A4mting =C2=A0=C2=A0www.jwd.se=C2=A0|=C2=A0mattias@jwd.s= e=C2=A0| 070-6760182 =C2=A0=C2=A0Internet, Coding, Design, Usablility - since 1998 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:43:29 +0200 Message-ID: <87hbh7s0da.fsf@gmx.de> References: <87aao21i92.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=40869 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P1LII-00077p-Nl for emacs-orgmode@gnu.org; Thu, 30 Sep 2010 11:43:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1P1LIF-0000AQ-T4 for emacs-orgmode@gnu.org; Thu, 30 Sep 2010 11:43:38 -0400 Received: from mailout-de.gmx.net ([213.165.64.23]:48033 helo=mail.gmx.net) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1P1LIF-0000A3-Ig for emacs-orgmode@gnu.org; Thu, 30 Sep 2010 11:43:35 -0400 In-Reply-To: ("Mattias =?utf-8?Q?J=C3=A4mting=22's?= message of "Thu, 30 Sep 2010 15:11:50 +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 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 differentl= y? 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 characters = 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!! Sebastian 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Mattias_J=C3=A4mting?= Subject: Re: Org-protocol / Chrome on Linux Date: Thu, 25 Nov 2010 00:23:43 +0100 Message-ID: References: <87aao21i92.fsf@gmx.de> <87hbh7s0da.fsf@gmx.de> <87aamzrzry.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=46001 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PLOh7-0006eG-5o for emacs-orgmode@gnu.org; Wed, 24 Nov 2010 18:24:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PLOh5-0004W0-PU for emacs-orgmode@gnu.org; Wed, 24 Nov 2010 18:24:09 -0500 Received: from mail-qy0-f169.google.com ([209.85.216.169]:48959) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PLOh5-0004VU-Mn for emacs-orgmode@gnu.org; Wed, 24 Nov 2010 18:24:07 -0500 Received: by qyk4 with SMTP id 4so4927286qyk.0 for ; Wed, 24 Nov 2010 15:24:06 -0800 (PST) Received: by qwf7 with SMTP id 7so661028qwf.0 for ; Wed, 24 Nov 2010 15:24:03 -0800 (PST) In-Reply-To: <87aamzrzry.fsf@gmx.de> 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: Sebastian Rose Cc: emacs-orgmode Hello again, For reference, this is how i finally got org-protocol to work in chrome on ubuntu 10.10: The problem was that chrome was running xdg-open for handling external protocols. xdg-open, or it's companion gvfs-open, couldn't parse the rather complex URL which the org-capture bookmarklet generated. So i realized that xdg-open is just a shell-script so then i modified the function open-gnome() in it like this: open_gnome() { # Handle org-protocol if (echo "$1" | grep -q '^org-protocol://'); then emacsclient "$1" else=09 # This is the standard way... if gvfs-open --help 2>/dev/null 1>&2; then gvfs-open "$1" else gnome-open "$1" fi fi ... } Suddenly all works. Remember to back-up xdg-open if you want to try this. Mattias 2010/9/30 Sebastian Rose : > 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%2Forgmod= e.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 differen= tly? >> >> >> Ooops! >> >> I just was going to blame Google. >> >> Looking into the ECMA standard, I found this: >> >> 15.1.3 URI Handling Function Properties >> >> =C2=A0 =C2=A0 =C2=A0 =C2=A0... ... >> >> =C2=A0 =C2=A0 =C2=A0 =C2=A0A URI is composed of a sequence of components= separated by >> =C2=A0 =C2=A0 =C2=A0 =C2=A0component separators. The general form >> =C2=A0 =C2=A0 =C2=A0 =C2=A0is: >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Scheme : F= irst / Second ; Third ? Fourth >> >> =C2=A0 =C2=A0 =C2=A0 =C2=A0where the italicised names represent componen= ts and the =E2=80=9C:=E2=80=9D, =E2=80=9C/=E2=80=9D, >> =C2=A0 =C2=A0 =C2=A0 =C2=A0=E2=80=9C;=E2=80=9D and =E2=80=9C?=E2=80=9D a= re reserved characters used as separators. The >> =C2=A0 =C2=A0 =C2=A0 =C2=A0encodeURI and decodeURI functions are intende= d to work with >> =C2=A0 =C2=A0 =C2=A0 =C2=A0complete URIs; they assume that any reserved = characters in the >> =C2=A0 =C2=A0 =C2=A0 =C2=A0URI are intended to have special meaning and = so are not >> =C2=A0 =C2=A0 =C2=A0 =C2=A0encoded. The encodeURIComponent and decodeURI= Component functions >> =C2=A0 =C2=A0 =C2=A0 =C2=A0are intended to work with the individual comp= onent parts of a >> =C2=A0 =C2=A0 =C2=A0 =C2=A0URI; they assume that any reserved characters= represent text and >> =C2=A0 =C2=A0 =C2=A0 =C2=A0so must be encoded so that they are not inter= preted as reserved >> =C2=A0 =C2=A0 =C2=A0 =C2=A0characters when the component is part of a co= mplete URI. >> >> >> That document states "encodeURI" is to be used with complete URIs (as >> the name says...). =C2=A0Funny. =C2=A0Chrome is the only browser that wo= rks like >> that :) >> >> I'll go and adjust the docs. >> >> >> Thanks for your Report!! >> > > > > Actually --- errr --- there is nothing to adjust. =C2=A0The docs are exac= tly > right. > > This is because of some =C3=B6rfflkjsgs in xdg-open. > > No one ever said something about xdg-open. =C2=A0Org-protocol is supposed= to > work with emacsclient: > > mattias@helium:~$ emacsclient org-protocol://capture://http%3A%2F%2Forgmo= de.org > > > works. > > > =C2=A0Sebastian > > --=20 =C2=A0Mattias J=C3=A4mting =C2=A0=C2=A0www.jwd.se=C2=A0|=C2=A0mattias@jwd.s= e=C2=A0| 070-6760182 =C2=A0=C2=A0Internet, Coding, Design, Usablility - since 1998 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ross Patterson Subject: Re: Org-protocol / Chrome on Linux Date: Thu, 09 Dec 2010 22:44:18 -0800 Message-ID: <87k4jiuny5.fsf@transitory.lefae.org> References: <87aao21i92.fsf@gmx.de> <87hbh7s0da.fsf@gmx.de> <87aamzrzry.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from [140.186.70.92] (port=40314 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQwie-0005xN-1m for emacs-orgmode@gnu.org; Fri, 10 Dec 2010 01:44:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PQwic-0001dH-By for emacs-orgmode@gnu.org; Fri, 10 Dec 2010 01:44:39 -0500 Received: from lo.gmane.org ([80.91.229.12]:37290) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PQwib-0001d1-Ui for emacs-orgmode@gnu.org; Fri, 10 Dec 2010 01:44:38 -0500 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PQwiZ-0006Bb-Dc for emacs-orgmode@gnu.org; Fri, 10 Dec 2010 07:44:35 +0100 Received: from 69.12.174.198 ([69.12.174.198]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 10 Dec 2010 07:44:35 +0100 Received: from me by 69.12.174.198 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 10 Dec 2010 07:44:35 +0100 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: emacs-orgmode@gnu.org Mattias Jämting writes: > Hello again, > > For reference, this is how i finally got org-protocol to work in > chrome on ubuntu 10.10: > > The problem was that chrome was running xdg-open for handling external > protocols. xdg-open, or it's companion gvfs-open, couldn't parse the > rather complex URL which the org-capture bookmarklet generated. I found a minimal test case and filed a bug for this: https://bugs.launchpad.net/ubuntu/+source/libgnome/+bug/688436 The key to this is that using "%2F" in the URL *path* causes gvfs-open and gnome-open to raise an error. $ gvfs-open "http://foo.com/bar%2Fqux" gvfs-open: http://foo.com/bar%2Fqux: error opening location: Operation not supported While this is a bug in those packages, I've always thought the org-protocol URL format was problematic. Why not use URL query args instead? Note that gvfs-open and gnome-open handle that just fine: $ gvfs-open "http://foo.com?blah=bar%2Fqux" It seems like org-protocol would have fewer edge case problems and would have URLs that would make more sense to more people if we used URL query args instead: org-protocol://store-link?URL=http%3A%2F%2Ffoo.com&TITLE=Bar%20Qux&BODY=blah%20blah If this sounds good, I'd be happy to submit patches for this. Provided there's something available in emacs for parsing URL query args. Ross > So i realized that xdg-open is just a shell-script so then i modified > the function open-gnome() in it like this: > > open_gnome() > { > # Handle org-protocol > if (echo "$1" | grep -q '^org-protocol://'); then > emacsclient "$1" > else > # This is the standard way... > if gvfs-open --help 2>/dev/null 1>&2; then > gvfs-open "$1" > else > gnome-open "$1" > fi > fi > ... > } > > Suddenly all works. Remember to back-up xdg-open if you want to try this. > > Mattias > > 2010/9/30 Sebastian Rose : >> Sebastian Rose writes: >>> Mattias Jämting 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 differently? >>> >>> >>> 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 >>>        is: >>>                  Scheme : First / Second ; Third ? Fourth >>> >>>        where the italicised names represent components and the “:”, “/”, >>>        “;” and “?” are reserved characters 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. >> >> This is because of some örfflkjsgs 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 >> >>