Hi Carsten, Carsten Dominik <domi...@uva.nl> 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