[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Problems with opening a link

From: Matt Lundin
Subject: Re: [O] Problems with opening a link
Date: Fri, 31 Mar 2017 12:54:40 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Hi Carsten,

Carsten Dominik <address@hidden> 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:


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

Meanwhile, `type` is...


...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):


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


Hope this helps in debugging.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]