From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marc Ihm Subject: Re: [PATCH] lisp/org.el: make org-open-at-point handle parens in encoded urls correctly Date: Fri, 11 Aug 2017 20:24:11 +0200 Message-ID: <598DF64B.8070005@ihm.name> References: <87valu5blb.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45473) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dgEbd-0001Ff-Cr for emacs-orgmode@gnu.org; Fri, 11 Aug 2017 14:24:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dgEba-00081W-8v for emacs-orgmode@gnu.org; Fri, 11 Aug 2017 14:24:21 -0400 Received: from smtp03.udag.de ([62.146.106.29]:33846) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dgEba-0007ze-2T for emacs-orgmode@gnu.org; Fri, 11 Aug 2017 14:24:18 -0400 In-Reply-To: <87valu5blb.fsf@nicolasgoaziou.fr> 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: Nicolas Goaziou Cc: emacs-orgmode@gnu.org Am 11.08.2017 um 18:10 schrieb Nicolas Goaziou: > Hello, > > Marc Ihm writes: > >> the attached patch changes org-open-at-point in org.el: >> >> Currently, when opening an url the function org-open-at-point uses the >> variable path, which is the result of applying org-link-unescape on >> the original url. Thus, all special chars like '() "' etc. which were >> originally encoded like %20%28 etc. are reverted to their clear text >> form. This worked for me in most cases, but gives me errors when my >> url contains encoded chars like '()', i.e. %28%29. >> >> The submitted patch fixes this by simply using the original url with >> all special chars still encoded. >> >> Please consider applying it, if fit. > > Thank you. > > The problem here is that Org could introduce additional percent-encoding > upon creating a link. This additional layer needs to be removed before > opening the link. > > I think there's a deeper issue to solve here. Your patch is likely to > move the problem elsewhere. > > Regards, > Hi Nicolas, well the code which I tried to patch is indeed convoluted and changing things might indeed have side effects; so I keep this fix for myself and see how it behaves on the long run :-) Thanx for explaining ! regards Marc