From c50f0c78d8132f71ebb9e1b9af7d288077f95bcf Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Tue, 8 May 2012 14:10:09 +0200 Subject: [PATCH] org.el (org-scan-tags): Correctly match TODO keywords. * org.el (org-scan-tags): Correctly match TODO keywords. Thanks to Simon Thum for reporting this. --- lisp/org.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index c0fb395ef..c73be41d5 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -12829,7 +12829,9 @@ headlines matching this string." " *\\(\\<\\(" (mapconcat 'regexp-quote org-todo-keywords-1 "\\|") (org-re - "\\>\\)\\)? *\\(.*?\\)\\(:[[:alnum:]_@#%:]+:\\)?[ \t]*$"))) + (if todo-only + "\\>\\)\\)[ \t]+\\(.*?\\)\\(:[[:alnum:]_@#%:]+:\\)?[ \t]*$" + "\\>\\)\\)? *\\([^ ].*?\\)\\(:[[:alnum:]_@#%:]+:\\)?[ \t]*$")))) (props (list 'face 'default 'done-face 'org-agenda-done 'undone-face 'default