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