From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Problems with opening a link Date: Fri, 31 Mar 2017 11:39:25 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113a0ab206683f054c039712 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42268) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ctt27-0005fu-G6 for emacs-orgmode@gnu.org; Fri, 31 Mar 2017 05:39:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ctt23-0004d5-C5 for emacs-orgmode@gnu.org; Fri, 31 Mar 2017 05:39:51 -0400 Received: from mail-io0-x22b.google.com ([2607:f8b0:4001:c06::22b]:35392) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ctt23-0004cb-7g for emacs-orgmode@gnu.org; Fri, 31 Mar 2017 05:39:47 -0400 Received: by mail-io0-x22b.google.com with SMTP id z13so36248102iof.2 for ; Fri, 31 Mar 2017 02:39:46 -0700 (PDT) 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" To: org-mode list --001a113a0ab206683f054c039712 Content-Type: text/plain; charset=UTF-8 Hi everyone, I have problems opening a link in org. The link looks like this: https://ui.adsabs.harvard.edu/#search/q=author%3A%22Dominik%2CC%22/metrics I have copied it like this from the address bar in a browser. If I click on it in Org-mode, the link is modified to https://ui.adsabs.harvard.edu/%23search/q=author:%22Dominik,C%22/metrics before being sent to the browser, and the browser cannot resolve it. The problem seems to be that # has been turned into %23 Where does this happen, and how can I fix this? Thank you. Carsten --001a113a0ab206683f054c039712 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi everyone,

I have problems opening a = link in org.

The link looks like this:


I have copied it l= ike this from the address bar in a browser.

If I c= lick on it in Org-mode, the link is modified to

https://ui.adsabs.harvard.edu/%23search/q=3Dauthor:%22Dominik,C%2= 2/metrics

before being sent to the browser= , and the browser cannot resolve it.=C2=A0 The problem seems to be that # h= as been turned into %23

Where does this happen, an= d how can I fix this?

Thank you.

Car= sten
--001a113a0ab206683f054c039712-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Davis Subject: Re: Problems with opening a link Date: Fri, 31 Mar 2017 08:05:33 -0400 Message-ID: <1490961933.3573631.929769568.2C95E21A@webmail.messagingengine.com> References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="_----------=_149096193335736312" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50013) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ctvJD-0007WK-SW for emacs-orgmode@gnu.org; Fri, 31 Mar 2017 08:05:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ctvJA-00061j-Mm for emacs-orgmode@gnu.org; Fri, 31 Mar 2017 08:05:39 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:37136) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ctvJA-000604-Ai for emacs-orgmode@gnu.org; Fri, 31 Mar 2017 08:05:36 -0400 In-Reply-To: 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" To: emacs-orgmode@gnu.org This is a multi-part message in MIME format. --_----------=_149096193335736312 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" It also appears that %3A gets turned into : On Fri, Mar 31, 2017, at 05:39 AM, Carsten Dominik wrote: > Hi everyone, >=20 > I have problems opening a link in org. >=20 > The link looks like this: >=20 > https://ui.adsabs.harvard.edu/#search/q=3Dauthor%3A%22Dominik%2CC%22/metr= ics >=20 > I have copied it like this from the address bar in a browser. >=20 > If I click on it in Org-mode, the link is modified to >=20 > https://ui.adsabs.harvard.edu/%23search/q=3Dauthor:%22Dominik,C%22/metrics >=20 > before being sent to the browser, and the browser cannot resolve it. > The problem seems to be that # has been turned into %23 >=20 > Where does this happen, and how can I fix this? >=20 > Thank you. >=20 > Carsten -- Peter Davis =C2=A0 www.techcurmudgeon.com --_----------=_149096193335736312 Content-Transfer-Encoding: 7bit Content-Type: text/html; charset="utf-8"
It also appears that %3A gets turned into :


On Fri, Mar 31, 2017, at 05:39 AM, Carsten Dominik wrote:
Hi everyone,

I have problems opening a link in org.

The link looks like this:


I have copied it like this from the address bar in a browser.

If I click on it in Org-mode, the link is modified to


before being sent to the browser, and the browser cannot resolve it.  The problem seems to be that # has been turned into %23

Where does this happen, and how can I fix this?

Thank you.

Carsten

--
  Peter Davis
  www.techcurmudgeon.com
--_----------=_149096193335736312-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Randby Subject: Re: Problems with opening a link Date: Fri, 31 Mar 2017 08:22:15 -0400 Message-ID: <91a716df-fc92-9e76-fb13-33e066655aab@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54318) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ctvZQ-0005bB-1z for emacs-orgmode@gnu.org; Fri, 31 Mar 2017 08:22:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ctvZO-0008Ce-Ug for emacs-orgmode@gnu.org; Fri, 31 Mar 2017 08:22:24 -0400 Received: from mail-io0-x22a.google.com ([2607:f8b0:4001:c06::22a]:33639) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ctvZO-0008CG-Ob for emacs-orgmode@gnu.org; Fri, 31 Mar 2017 08:22:22 -0400 Received: by mail-io0-x22a.google.com with SMTP id f84so38243188ioj.0 for ; Fri, 31 Mar 2017 05:22:22 -0700 (PDT) In-Reply-To: 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" To: Carsten Dominik , org-mode list On 03/31/2017 05:39 AM, Carsten Dominik wrote: > Hi everyone, > > I have problems opening a link in org. > > The link looks like this: > > https://ui.adsabs.harvard.edu/#search/q=author%3A%22Dominik%2CC%22/metrics > > I have copied it like this from the address bar in a browser. > > If I click on it in Org-mode, the link is modified to > > https://ui.adsabs.harvard.edu/%23search/q=author:%22Dominik,C%22/metrics > > before being sent to the browser, and the browser cannot resolve it. > The problem seems to be that # has been turned into %23 The link worked fine when I tried opening it from an Org file. I'm using Org 9.0.3 in Emacs 24.5.1 and my browser is Firefox. Scott Randby > > Where does this happen, and how can I fix this? > > Thank you. > > Carsten From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Problems with opening a link Date: Fri, 31 Mar 2017 14:52:31 +0200 Message-ID: References: <91a716df-fc92-9e76-fb13-33e066655aab@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11446a20988aef054c0649d1 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34879) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ctw2v-0004ZY-Lt for emacs-orgmode@gnu.org; Fri, 31 Mar 2017 08:52:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ctw2u-0004Fm-PI for emacs-orgmode@gnu.org; Fri, 31 Mar 2017 08:52:53 -0400 Received: from mail-it0-x22d.google.com ([2607:f8b0:4001:c0b::22d]:38595) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ctw2u-0004FG-Kf for emacs-orgmode@gnu.org; Fri, 31 Mar 2017 08:52:52 -0400 Received: by mail-it0-x22d.google.com with SMTP id y18so11208992itc.1 for ; Fri, 31 Mar 2017 05:52:52 -0700 (PDT) In-Reply-To: <91a716df-fc92-9e76-fb13-33e066655aab@gmail.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" To: Scott Randby Cc: org-mode list --001a11446a20988aef054c0649d1 Content-Type: text/plain; charset=UTF-8 Hi Scott, which system are you on? I am using a Mac, and the "open" command in the mac as browse-url-generic-program Carsten On Fri, Mar 31, 2017 at 2:22 PM, Scott Randby wrote: > On 03/31/2017 05:39 AM, Carsten Dominik wrote: > > Hi everyone, > > > > I have problems opening a link in org. > > > > The link looks like this: > > > > https://ui.adsabs.harvard.edu/#search/q=author%3A%22Dominik% > 2CC%22/metrics > > > > I have copied it like this from the address bar in a browser. > > > > If I click on it in Org-mode, the link is modified to > > > > https://ui.adsabs.harvard.edu/%23search/q=author:%22Dominik,C%22/metrics > > > > before being sent to the browser, and the browser cannot resolve it. > > The problem seems to be that # has been turned into %23 > > The link worked fine when I tried opening it from an Org file. I'm using > Org 9.0.3 in Emacs 24.5.1 and my browser is Firefox. > > Scott Randby > > > > > Where does this happen, and how can I fix this? > > > > Thank you. > > > > Carsten > --001a11446a20988aef054c0649d1 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Scott,

which system are you on?

I am using a Mac, and the "open" command in = the mac as browse-url-generic-program

Carsten

On Fri, Ma= r 31, 2017 at 2:22 PM, Scott Randby <srandby@gmail.com> wrot= e:
On 03/31/2017 05:39 A= M, Carsten Dominik wrote:
> Hi everyone,
>
> I have problems opening a link in org.
>
> The link looks like this:
>
> https://ui.adsabs.h= arvard.edu/#search/q=3Dauthor%3A%22Dominik%2CC%22/metrics
>
> I have copied it like this from the address bar in a browser.
>
> If I click on it in Org-mode, the link is modified to
>
> https://ui.adsabs.har= vard.edu/%23search/q=3Dauthor:%22Dominik,C%22/metrics
>
> before being sent to the browser, and the browser cannot resolve it. > The problem seems to be that # has been turned into %23

The link worked fine when I tried opening it from an Org file. I'= ;m using
Org 9.0.3 in Emacs 24.5.1 and my browser is Firefox.

Scott Randby

>
> Where does this happen, and how can I fix this?
>
> Thank you.
>
> Carsten

--001a11446a20988aef054c0649d1-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Tim O'Callaghan" Subject: Re: Problems with opening a link Date: Fri, 31 Mar 2017 16:30:49 +0200 Message-ID: References: <91a716df-fc92-9e76-fb13-33e066655aab@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34418) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ctxaO-0003gz-1b for emacs-orgmode@gnu.org; Fri, 31 Mar 2017 10:31:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ctxaN-0001te-5w for emacs-orgmode@gnu.org; Fri, 31 Mar 2017 10:31:32 -0400 Received: from mail-pg0-x22f.google.com ([2607:f8b0:400e:c05::22f]:33403) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ctxaN-0001tT-0X for emacs-orgmode@gnu.org; Fri, 31 Mar 2017 10:31:31 -0400 Received: by mail-pg0-x22f.google.com with SMTP id x125so72876887pgb.0 for ; Fri, 31 Mar 2017 07:31:30 -0700 (PDT) In-Reply-To: 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" To: org-mode Hi, I've had a similar issue, but with redmine links. if i have #+LINK: rm http://redmine/issues/%s * link [[rm:3287]] does not work properly any more (with firefox under KDE) best regards, Tim. On 31 March 2017 at 14:52, Carsten Dominik wrote: > Hi Scott, > > which system are you on? > > I am using a Mac, and the "open" command in the mac as > browse-url-generic-program > > Carsten > > On Fri, Mar 31, 2017 at 2:22 PM, Scott Randby wrote: >> >> On 03/31/2017 05:39 AM, Carsten Dominik wrote: >> > Hi everyone, >> > >> > I have problems opening a link in org. >> > >> > The link looks like this: >> > >> > >> > https://ui.adsabs.harvard.edu/#search/q=author%3A%22Dominik%2CC%22/metrics >> > >> > I have copied it like this from the address bar in a browser. >> > >> > If I click on it in Org-mode, the link is modified to >> > >> > https://ui.adsabs.harvard.edu/%23search/q=author:%22Dominik,C%22/metrics >> > >> > before being sent to the browser, and the browser cannot resolve it. >> > The problem seems to be that # has been turned into %23 >> >> The link worked fine when I tried opening it from an Org file. I'm using >> Org 9.0.3 in Emacs 24.5.1 and my browser is Firefox. >> >> Scott Randby >> >> > >> > Where does this happen, and how can I fix this? >> > >> > Thank you. >> > >> > Carsten > > From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Randby Subject: Re: Problems with opening a link Date: Fri, 31 Mar 2017 12:04:00 -0400 Message-ID: References: <91a716df-fc92-9e76-fb13-33e066655aab@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40388) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ctz21-0000yn-Ts for emacs-orgmode@gnu.org; Fri, 31 Mar 2017 12:04:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ctz21-0002Ec-0t for emacs-orgmode@gnu.org; Fri, 31 Mar 2017 12:04:09 -0400 Received: from mail-io0-x22e.google.com ([2607:f8b0:4001:c06::22e]:36676) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ctz20-0002EA-Ph for emacs-orgmode@gnu.org; Fri, 31 Mar 2017 12:04:08 -0400 Received: by mail-io0-x22e.google.com with SMTP id l7so42377282ioe.3 for ; Fri, 31 Mar 2017 09:04:08 -0700 (PDT) In-Reply-To: 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" To: Carsten Dominik , org-mode list On 03/31/2017 08:52 AM, Carsten Dominik wrote: > Hi Scott, > > which system are you on? > > I am using a Mac, and the "open" command in the mac as > browse-url-generic-program I'm using Xubuntu 16.04. I believe the function being used is browse-url-browser-function which I have set to browse-url-firefox. The variable browse-url-generic-program has no value on my system. Scott > > Carsten > > On Fri, Mar 31, 2017 at 2:22 PM, Scott Randby > wrote: > > On 03/31/2017 05:39 AM, Carsten Dominik wrote: > > Hi everyone, > > > > I have problems opening a link in org. > > > > The link looks like this: > > > > https://ui.adsabs.harvard.edu/#search/q=author%3A%22Dominik%2CC%22/metrics > > > > > I have copied it like this from the address bar in a browser. > > > > If I click on it in Org-mode, the link is modified to > > > > https://ui.adsabs.harvard.edu/%23search/q=author:%22Dominik,C%22/metrics > > > > > before being sent to the browser, and the browser cannot resolve it. > > The problem seems to be that # has been turned into %23 > > The link worked fine when I tried opening it from an Org file. I'm using > Org 9.0.3 in Emacs 24.5.1 and my browser is Firefox. > > Scott Randby > > > > > Where does this happen, and how can I fix this? > > > > Thank you. > > > > Carsten > > From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: Re: Problems with opening a link Date: Fri, 31 Mar 2017 12:02:18 -0500 Message-ID: <8737dt752d.fsf@fastmail.fm> References: <91a716df-fc92-9e76-fb13-33e066655aab@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34055) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ctzwP-0000wU-CP for emacs-orgmode@gnu.org; Fri, 31 Mar 2017 13:02:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ctzwL-0002Ay-9i for emacs-orgmode@gnu.org; Fri, 31 Mar 2017 13:02:25 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:41007) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ctzwK-00027v-Tv for emacs-orgmode@gnu.org; Fri, 31 Mar 2017 13:02:21 -0400 In-Reply-To: (Tim O'Callaghan's message of "Fri, 31 Mar 2017 16:30:49 +0200") 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" To: Tim O'Callaghan Cc: org-mode "Tim O'Callaghan" writes: > I've had a similar issue, but with redmine links. > if i have > > #+LINK: rm http://redmine/issues/%s > > * link [[rm:3287]] does not work properly any more (with firefox under > KDE) The link above is missing ".org". It should look like this: #+LINK: rm http://redmine.org/issues/%s Matt From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: Re: Problems with opening a link Date: Fri, 31 Mar 2017 12:54:40 -0500 Message-ID: <874ly95o2n.fsf@fastmail.fm> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53454) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cu0l5-0006B8-2M for emacs-orgmode@gnu.org; Fri, 31 Mar 2017 13:54:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cu0l1-0007dc-56 for emacs-orgmode@gnu.org; Fri, 31 Mar 2017 13:54:47 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:44149) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cu0l0-0007cc-HL for emacs-orgmode@gnu.org; Fri, 31 Mar 2017 13:54:43 -0400 In-Reply-To: (Carsten Dominik's message of "Fri, 31 Mar 2017 11:39:25 +0200") 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" To: Carsten Dominik Cc: org-mode list Hi Carsten, Carsten Dominik writes: > Hi everyone, > > I have problems opening a link in org. > > The link looks like this: > > https://ui.adsabs.harvard.edu/#search/q=author%3A%22Dominik%2CC%22/metrics > > I have copied it like this from the address bar in a browser. > > If I click on it in Org-mode, the link is modified to > > https://ui.adsabs.harvard.edu/%23search/q=author:%22Dominik,C%22/metrics > > before being sent to the browser, and the browser cannot resolve it. > The problem seems to be that # has been turned into %23 I cannot replicate this on Linux, but there do seem to be some inconsistencies with how Org-mode is escaping/unescaping links: AFAICT, Org-mode itself is not modifying the "#". The relevant lines of org-open-at-point are 10747-10748: ((functionp (org-link-get-parameter type :follow)) (funcall (org-link-get-parameter type :follow) path)) Just simply copying and pasting the link from the browser, I found that `path` at the lines above is: //ui.adsabs.harvard.edu/#search/q=author:"Dominik,C"/metrics Note: the time one gets to this point, the path has already been unescaped (see line 10712). Meanwhile, `type` is... https ...which results in org-open-at-point calling the following: (lambda (path) (browse-url (concat "https:" path))) However, there are inconsistencies when one turns the pasted url above into an actual org-link (e.g., by calling org-insert-link). Then the link in org-mode looks like this (note that the escape percentage characters are themselves escaped, which seems a bit strange to me): [[https://ui.adsabs.harvard.edu/#search/q=author%253A%2522Dominik%252CC%2522/metrics]] Now when you open at point, the `path` at line 10748 is: //ui.adsabs.harvard.edu/#search/q=author%3A%22Dominik%2CC%22/metrics Hope this helps in debugging. Matt From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Problems with opening a link Date: Sat, 1 Apr 2017 10:57:33 +0200 Message-ID: References: <874ly95o2n.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113a0ab21f21bf054c171f5a Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34917) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cuEr6-0001GJ-4k for emacs-orgmode@gnu.org; Sat, 01 Apr 2017 04:57:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cuEr4-0003ee-MV for emacs-orgmode@gnu.org; Sat, 01 Apr 2017 04:57:56 -0400 Received: from mail-io0-x22e.google.com ([2607:f8b0:4001:c06::22e]:33583) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cuEr4-0003eQ-Fn for emacs-orgmode@gnu.org; Sat, 01 Apr 2017 04:57:54 -0400 Received: by mail-io0-x22e.google.com with SMTP id f84so52144256ioj.0 for ; Sat, 01 Apr 2017 01:57:54 -0700 (PDT) In-Reply-To: <874ly95o2n.fsf@fastmail.fm> 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" To: Carsten Dominik , org-mode list --001a113a0ab21f21bf054c171f5a Content-Type: text/plain; charset=UTF-8 Hi everyone, thank you for your input. Matt, thanks a lot for the detailed look into this. Indeed there are inconsistencies on how this works in Org, and there are things happening that are system dependent. I thibk what is biting me this time is the system dependence which is really weird. When I, on my Mac, call this from a commandline in bash $ open https://ui.adsabs.harvard.edu/#search/q=author%3A%22Dominik%2CC%22/metrics things work. So I made a little perl program, myopenurl, that looks like this: #!/usr/bin/perl $url = join(" ",@ARGV); system "open \"$url\"; and that does the trick when I put it into browse-url-generic-program. Fixed for now, but I think the entire url quoting scheme in Org might deserve another look. Thanks. Carsten On Fri, Mar 31, 2017 at 7:54 PM, Matt Lundin wrote: > Hi Carsten, > > Carsten Dominik writes: > > > Hi everyone, > > > > I have problems opening a link in org. > > > > The link looks like this: > > > > https://ui.adsabs.harvard.edu/#search/q=author%3A%22Dominik% > 2CC%22/metrics > > > > I have copied it like this from the address bar in a browser. > > > > If I click on it in Org-mode, the link is modified to > > > > https://ui.adsabs.harvard.edu/%23search/q=author:%22Dominik,C%22/metrics > > > > before being sent to the browser, and the browser cannot resolve it. > > The problem seems to be that # has been turned into %23 > > I cannot replicate this on Linux, but there do seem to be some > inconsistencies with how Org-mode is escaping/unescaping links: > > AFAICT, Org-mode itself is not modifying the "#". The relevant lines of > org-open-at-point are 10747-10748: > > ((functionp (org-link-get-parameter type :follow)) > (funcall (org-link-get-parameter type :follow) path)) > > Just simply copying and pasting the link from the browser, I found that > `path` at the lines above is: > > //ui.adsabs.harvard.edu/#search/q=author:"Dominik,C"/metrics > > Note: the time one gets to this point, the path has already been > unescaped (see line 10712). > > Meanwhile, `type` is... > > https > > ...which results in org-open-at-point calling the following: > > (lambda (path) (browse-url (concat "https:" path))) > > However, there are inconsistencies when one turns the pasted url above > into an actual org-link (e.g., by calling org-insert-link). > > Then the link in org-mode looks like this (note that the escape > percentage characters are themselves escaped, which seems a bit strange > to me): > > [[https://ui.adsabs.harvard.edu/#search/q=author%253A% > 2522Dominik%252CC%2522/metrics]] > > Now when you open at point, the `path` at line 10748 is: > > //ui.adsabs.harvard.edu/#search/q=author%3A%22Dominik%2CC%22/metrics > > Hope this helps in debugging. > Matt > --001a113a0ab21f21bf054c171f5a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi everyone, thank you for your input.=C2=A0 Matt, th= anks a lot for the detailed look into this.=C2=A0 Indeed there are inconsis= tencies on how this works in Org, and there are things happening that are s= ystem dependent.=C2=A0 I thibk what is biting me this time is the system de= pendence which is really weird.

When I, on my Mac,= call this from a commandline in bash
$ open https:= //ui.adsabs.harvard.edu/#search/q=3Dauthor%3A%22Dominik%2CC%22/metrics<= /div>

things work.=C2=A0 So I made a little perl program= , myopenurl, that looks like this:

#!/usr/bin/perl=
$url =3D join(" ",@ARGV);
system "open = \"$url\";

and that does the trick when I= put it into browse-url-generic-program.
Fixed for now, but I thi= nk the entire url quoting scheme in Org might deserve another look.

Thanks.

Carsten
<= div class=3D"gmail_extra">
On Fri, Mar 31, 20= 17 at 7:54 PM, Matt Lundin <mdl@imapmail.org> wrote:
Hi Carsten,

Carsten Dominik <dominik@uva.nl>= ; writes:

> Hi everyone,
>
> I have problems opening a link in org.
>
> The link looks like this:
>
> https://ui.adsabs.h= arvard.edu/#search/q=3Dauthor%3A%22Dominik%2CC%22/metrics
>
> I have copied it like this from the address bar in a browser.
>
> If I click on it in Org-mode, the link is modified to
>
> https://ui.adsabs.har= vard.edu/%23search/q=3Dauthor:%22Dominik,C%22/metrics
>
> before being sent to the browser, and the browser cannot resolve it. > The problem seems to be that # has been turned into %23

I cannot replicate this on Linux, but there do seem to be some
inconsistencies with how Org-mode is escaping/unescaping links:

AFAICT, Org-mode itself is not modifying the "#". The relevant li= nes of
org-open-at-point are 10747-10748:

=C2=A0 =C2=A0 =C2=A0 ((functionp (org-link-get-parameter type :follow))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (funcall (org-link-get-parameter type :follow) = path))

Just simply copying and pasting the link from the browser, I found that
`path` at the lines above is:

//ui.adsabs.harvard.edu/#search/q=3Dauthor:&= quot;Dominik,C"/metrics

Note: the time one gets to this point, the path has already been
unescaped (see line 10712).

Meanwhile, `type` is...

https

...which results in org-open-at-point calling the following:

(lambda (path) (browse-url (concat "https:" path)))

However, there are inconsistencies when one turns the pasted url above
into an actual org-link (e.g., by calling org-insert-link).

Then the link in org-mode looks like this (note that the escape
percentage characters are themselves escaped, which seems a bit strange
to me):

[[https://ui.ads= abs.harvard.edu/#search/q=3Dauthor%253A%2522Dominik%252CC%2522/me= trics]]

Now when you open at point, the `path` at line 10748 is:

//ui.adsabs.harvard.edu/#= search/q=3Dauthor%3A%22Dominik%2CC%22/metrics

Hope this helps in debugging.
Matt

--001a113a0ab21f21bf054c171f5a-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Problems with opening a link Date: Sat, 01 Apr 2017 14:16:16 +0200 Message-ID: <87lgrkmigf.fsf@nicolasgoaziou.fr> References: <874ly95o2n.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33999) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cuHxC-0002bX-4U for emacs-orgmode@gnu.org; Sat, 01 Apr 2017 08:16:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cuHx7-0002X3-9O for emacs-orgmode@gnu.org; Sat, 01 Apr 2017 08:16:26 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:55515) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cuHx7-0002V2-27 for emacs-orgmode@gnu.org; Sat, 01 Apr 2017 08:16:21 -0400 In-Reply-To: (Carsten Dominik's message of "Sat, 1 Apr 2017 10:57:33 +0200") 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" To: Carsten Dominik Cc: org-mode list Hello, Carsten Dominik writes: > but I think the entire url quoting scheme in Org might deserve another > look. It does. I also suggested to think about it some time ago. Ideally, Org should never quote any URI whatsoever. This is really the root of all evil, because you never know if characters are escaped, and, as a consequence, you never really know how many un-escaping turns are required. Unfortunately, there are a couple of forbidden characters in link syntax, namely "[", "]", and multiple consecutive spaces. So, if we want to allow those in, e.g. file names or labels ("http" URL are not a problem since you can hex-encode them), we need some kind of escaping mechanism. In any case, it should be different than hex-encoding so we can tell if there is some Org specific escaping involved. Just some data to keep the ball rolling. Regards, -- Nicolas Goaziou