From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: link export confused when URL parameter is another URL Date: Thu, 21 Oct 2010 19:38:17 +0200 Message-ID: <57618952-F767-4DCC-8C75-E71DE28FF254@gmail.com> References: <87mxq888o1.wl%dmaus@ictsoc.de> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=43057 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P8z5s-0000pX-Rz for emacs-orgmode@gnu.org; Thu, 21 Oct 2010 13:38:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P8z5q-00062t-5u for emacs-orgmode@gnu.org; Thu, 21 Oct 2010 13:38:23 -0400 Received: from mail-ew0-f41.google.com ([209.85.215.41]:49350) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P8z5q-00062Q-16 for emacs-orgmode@gnu.org; Thu, 21 Oct 2010 13:38:22 -0400 Received: by ewy25 with SMTP id 25so348557ewy.0 for ; Thu, 21 Oct 2010 10:38:20 -0700 (PDT) In-Reply-To: <87mxq888o1.wl%dmaus@ictsoc.de> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: David Maus Cc: "Cook, Malcolm" , "'emacs-orgmode@gnu.org'" On Oct 21, 2010, at 6:35 AM, David Maus wrote: > At Thu, 30 Sep 2010 15:17:00 -0500, > Cook, Malcolm wrote: >> >> >> If find that this orgtext >> >> [[http://www.foo.com/foo?URL=http://www.bar.com][test]] >> >> exports to html incorrectly as >> >> [[http://www.foo.com/foo?URL=[[http://www.bar.com][test][http://www.bar.com >> ][test]]] >> >> using today's fresh git pull make install >> >> Any pointers? > > The problem here is that Org's (legacy) support for plain links > (i.e. without square brackets) kicks in and transforms the fragment > part to a normal square bracket link. > > My regexp-foo is not as it should be, but I am on this one to fix it; > What we need to express in `org-export-normalize-link' is, that a > plain link is something that looks like a hyperlink but not preceded > directly by a square or angle bracket and not after a question mark > followed by zero or more no-whitespace-characters. This is a bit hard without lookbehind assertions as they are available in perl. For something like this it is somtimes easier to just to the normal match you wanted to use anyway and then confirm by taking a separate look at the text before the match which is, for example, (buffer-substring (point-at-bol) (match-beginning 0)) HTH - Carsten