From e0072f79137bbfabdf848da6865d8e4de776a549 Mon Sep 17 00:00:00 2001 From: David Maus Date: Sun, 18 Mar 2012 18:38:50 +0100 Subject: [PATCH] Require one or more spaces (+) between keyword and headline * org.el (org-scan-tags): Require one or more spaces (+) between keyword and headline. Otherwise the re will match a line like: * TODO@ Foobar And assumes the @ to be part of the headline. This fixes a glitch reported by Simon Thum in <4F53DEF7.8080604@gmx.de>. > Hi all, > > I have found some irritating behaviour, potentially a bug. I have a > block agenda which goes like: > > tags-todo "@home&TODO=\"TODO\" > > and it displays a certain org line that reads > > **** TODO_ state triggers > > Which is just a heading for dealing with TODO state triggers, and I > appended the _ as I don't want it to be a TODO. > > For example, the global TODO list and syntax highlighting does not > consider it a todo, but C-c a m TODO="TODO" does. TODO="T" does not, > so it's not very grave. > > Most likely, it's simply an inconsistency arising from not having a > real parser. I just wanted to report it here so it may get fixed. --- lisp/org.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index 9285bc05c..04c5c6261 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -12785,7 +12785,7 @@ headlines matching this string." " *\\(\\<\\(" (mapconcat 'regexp-quote org-todo-keywords-1 "\\|") (org-re - "\\>\\)\\)? *\\(.*?\\)\\(:[[:alnum:]_@#%:]+:\\)?[ \t]*$"))) + "\\>\\)\\)? +\\(.*?\\)\\(:[[:alnum:]_@#%:]+:\\)?[ \t]*$"))) (props (list 'face 'default 'done-face 'org-agenda-done 'undone-face 'default