From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: [Accepted] Quote any special characters in org-make-target-link-regexp Date: Thu, 16 Dec 2010 14:13:28 +0100 (CET) Message-ID: <20101216131328.8ACD37D9939@carsten-dominiks-macbook-pro.local> References: <1292338919-22555-1-git-send-email-wence@gmx.li> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=34289 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PUMjb-00063R-VE for emacs-orgmode@gnu.org; Sun, 19 Dec 2010 12:07:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PUMjZ-0004yf-RG for emacs-orgmode@gnu.org; Sun, 19 Dec 2010 12:07:47 -0500 Received: from dslb-088-073-002-220.pools.arcor-ip.net ([88.73.2.220]:58282 helo=localhost.localhost) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PUMjZ-0004xL-ED for emacs-orgmode@gnu.org; Sun, 19 Dec 2010 12:07:45 -0500 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: emacs-orgmode@gnu.org Patch 483 (http://patchwork.newartisans.com/patch/483/) is now "Accepted". Maintainer comment: No comment This relates to the following submission: http://mid.gmane.org/%3C1292338919-22555-1-git-send-email-wence%40gmx.li%3E Here is the original message containing the patch: > Content-Type: text/plain; charset="utf-8" > MIME-Version: 1.0 > Content-Transfer-Encoding: 7bit > Subject: [Orgmode] Quote any special characters in org-make-target-link-regexp > Date: Tue, 14 Dec 2010 20:01:59 -0000 > From: Lawrence Mitchell > X-Patchwork-Id: 483 > Message-Id: <1292338919-22555-1-git-send-email-wence@gmx.li> > To: emacs-orgmode@gnu.org > Cc: Lawrence Mitchell > > * 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) >