From: Carsten Dominik <carsten.dominik@gmail.com>
To: Lawrence Mitchell <wence@gmx.li>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] Quote any special characters in org-make-target-link-regexp
Date: Thu, 16 Dec 2010 14:14:46 +0100 [thread overview]
Message-ID: <0B6FEECD-8279-4654-A66B-F75954973735@gmail.com> (raw)
In-Reply-To: <1292338919-22555-1-git-send-email-wence@gmx.li>
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 <<<foo.bar>>> 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
prev parent reply other threads:[~2010-12-16 13:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-14 15:01 [PATCH] Quote any special characters in org-make-target-link-regexp Lawrence Mitchell
2010-12-16 13:13 ` [Accepted] " Carsten Dominik
2010-12-16 13:14 ` Carsten Dominik [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0B6FEECD-8279-4654-A66B-F75954973735@gmail.com \
--to=carsten.dominik@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=wence@gmx.li \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.