From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: [PATCH] Quote any special characters in org-make-target-link-regexp Date: Thu, 16 Dec 2010 14:14:46 +0100 Message-ID: <0B6FEECD-8279-4654-A66B-F75954973735@gmail.com> References: <1292338919-22555-1-git-send-email-wence@gmx.li> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=51886 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PTDff-0006rk-41 for emacs-orgmode@gnu.org; Thu, 16 Dec 2010 08:15:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PTDfW-0005VV-MO for emacs-orgmode@gnu.org; Thu, 16 Dec 2010 08:14:51 -0500 Received: from mail-ew0-f43.google.com ([209.85.215.43]:44988) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PTDfW-0005VP-I3 for emacs-orgmode@gnu.org; Thu, 16 Dec 2010 08:14:50 -0500 Received: by ewy22 with SMTP id 22so1892671ewy.30 for ; Thu, 16 Dec 2010 05:14:49 -0800 (PST) In-Reply-To: <1292338919-22555-1-git-send-email-wence@gmx.li> 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: Lawrence Mitchell Cc: emacs-orgmode@gnu.org Lawrence, thanks for the patch, with flawless ChangeLog and commit message! Patch accepted. - Carsten On Dec 14, 2010, at 4:01 PM, Lawrence Mitchell wrote: > * lisp/org.el (org-make-target-link-regexp): regexp-quote target > before replacing whitespace. > > Previously a radio link <<<...>>> would match all three-letter words > in the buffer. The manual indicates the radio links are meant to > match literally (modulo whitespace differences), so we should > regexp-quote all the targets to avoid over-eager matching. > --- > This problem bit me when writing up some notes on CUDA, which uses > <<<...>>> to indicate a function call from a CPU onto a GPU. I think > this is the right fix, since I can't imagine a situation where you > would want <<>> to match foo.bar, rather than foo\\.bar. > > lisp/org.el | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/lisp/org.el b/lisp/org.el > index 6d1062c..5733d67 100644 > --- a/lisp/org.el > +++ b/lisp/org.el > @@ -5424,6 +5424,7 @@ between words." > "\\<\\(" > (mapconcat > (lambda (x) > + (setq x (regexp-quote x)) > (while (string-match " +" x) > (setq x (replace-match "\\s-+" t t x))) > x) > -- > 1.7.3.3.398.g0b0cd > > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode