From bccda67ce48dfb2ec2491969404d28f63c69ef75 Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Fri, 12 Apr 2013 10:45:31 +0200 Subject: [PATCH] org.el (org-tags-expand): Use word delimiters when building the tag search regexp * org.el (org-tags-expand): Use word delimiters when building the tag search regexp. Thanks to Christian Moe for reporting this bug. --- lisp/org.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index 57a8d61e8..6f898c470 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -14118,7 +14118,7 @@ When DOWNCASE is non-nil, expand downcased TAGS." (setq rpl (append (org-uniquify rpl) (assoc tag tal))) (setq rtnmatch (replace-match - (concat dir "{" (regexp-opt rpl) "}") t t rtnmatch)))) + (concat dir "{\\<" (regexp-opt rpl) "\\>}") t t rtnmatch)))) (if single-as-list (or (reverse rpl) (list rtnmatch)) rtnmatch)) -- 2.11.4.GIT