From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [BUG] External unicode links without a description in ox-html Date: Tue, 26 Jul 2016 21:05:15 +0200 Message-ID: <87oa5ku43i.fsf@saiph.selenimh> References: <87k2gg9xnb.fsf@systemreboot.net> <87fur46pq6.fsf@saiph.selenimh> <87y44pvqyy.fsf@saiph.selenimh> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53664) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bS7fM-0007se-Pg for emacs-orgmode@gnu.org; Tue, 26 Jul 2016 15:05:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bS7fI-0006MM-LO for emacs-orgmode@gnu.org; Tue, 26 Jul 2016 15:05:20 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:60516) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bS7fI-0006MG-Du for emacs-orgmode@gnu.org; Tue, 26 Jul 2016 15:05:16 -0400 In-Reply-To: (Michael Brand's message of "Mon, 25 Jul 2016 22:33:52 +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: Michael Brand Cc: org mode Hello, Michael Brand writes: >> This prevent any link with a description to contain either "]]" or > > ... a single bracket at the border or a link destination part to > contain "][" or "]]" or a single bracket at the border or ... Correct. >> multiple spaces, but these requirements are so uncommon we probably >> shouldn't bother. > > I never had such links and don't bother. If I am right these could > even be tweaked manually with %20, %5B and %5D to get working. Not really, because Org would no longer un-escape the URI. This could work for links opened with a browser, but not for other types (e.g., a target). > Do I understand right that not escaping and unescaping would allow > > : https://duckduckgo.com/?q=[dest]dest This one is already possible, isn't it? Also, I suggest to change brackets links, not plain links. > : [[https://duckduckgo.com/?q=[dest]dest]] > : [[https://duckduckgo.com/?q=[dest]dest][desc[desc]desc]] Yes, those would become valid. The following regexp could be used as a replacement for `org-bracket-link-regexp' "\\[\\[[^]+?\\(\\]\\[[^]]\\)?\\]\\]" or, with groups, "\\[\\[\\([^]+?\\)\\(?:\\]\\[\\([^]+?\\)\\)?\\]\\]" Regards, -- Nicolas Goaziou