From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Links Date: Wed, 17 Jun 2015 11:47:38 +0200 Message-ID: <87ioam8y4l.fsf@selenimh.access.network> References: <87wpz3akc4.fsf@selenimh.access.network> <877fr39w9t.fsf@selenimh.access.network> <20150617064456.GB28351@chitra.no-ip.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37599) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z59v9-00034F-4O for emacs-orgmode@gnu.org; Wed, 17 Jun 2015 05:46:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z59v8-0003Z7-4O for emacs-orgmode@gnu.org; Wed, 17 Jun 2015 05:46:11 -0400 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:43279) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z59v7-0003Xs-Un for emacs-orgmode@gnu.org; Wed, 17 Jun 2015 05:46:10 -0400 In-Reply-To: <20150617064456.GB28351@chitra.no-ip.org> (Suvayu Ali's message of "Wed, 17 Jun 2015 08:44:56 +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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Cc: Fabrice Popineau Hello, Suvayu Ali writes: > Would it make sense to "promote" these kind of encoded links to almost > their own sub-types? I would guess, almost no one enters these encoded > links by hand. It's either via copy paste in the prompt from > org-insert-link, or by entering [[encoded-link][description]] by hand. > I think it is a reasonable inconvenience to ask the user to prefix it > with something like uri:. I mostly see advantages for a minor > inconvenience. I don't think we should go as far as changing link syntax for this. Actually, the problem lies in internal links, since external ones are expected to be url-encoded when necessary. Internal links only require url-encoding when they contain square brackets. So, we can make a guess: if a string either doesn't contain "%5B" or "%5D", or contains any character in `org-link-escape-chars' (with the exception of the percent sign), it cannot be encoded. Otherwise, we can assume it is encoded. In this case, there are false positives, but those are sufficiently rare (i.e., an internal link with either "%5B" or "%5D" and no space in it) this should not be a problem in practice. There is an important drawback however, as in the prefix proposal: currently encoded internal links (e.g. "Headline%201") will break. > Although, you still have to handle the ambiguous case for existing Org > files. Unless this double maintenance is cumbersome, I would vote for > introducing such a scheme. The double maintenance is not possible. Either we take into consideration the prefix or the heuristic rule above, and some links are going to break, or we allow to bypass it and it doesn't improve the situation. Regards, -- Nicolas Goaziou