Hi Simon,

Simon Thum <simon.t...@gmx.de> writes:

> 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

Can you try the following patch (against latest hotfix HEAD) and report? 

Charles, can you let me know if this breaks anything in your usage of
`org-map-entries'? 

David's original fix want to the right direction, except that we also
want to match "* TODO" as a headline. 

Thanks for testing this quite heavily.

diff --git a/lisp/org.el b/lisp/org.el
index 3dd8f88..ea5ef7c 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -12824,7 +12824,7 @@ headlines matching this string."
 		     " *\\(\\<\\("
 		     (mapconcat 'regexp-quote org-todo-keywords-1 "\\|")
 		     (org-re
-		      "\\>\\)\\)? *\\(.*?\\)\\(:[[:alnum:]_@#%:]+:\\)?[ \t]*$")))
+		      "\\>\\)\\)?\\([ \t]*\\|$\\)+\\(.*?\\)\\(:[[:alnum:]_@#%:]+:\\)?[ \t]*$")))
 	 (props (list 'face 'default
 		      'done-face 'org-agenda-done
 		      'undone-face 'default
-- 
 Bastien

Reply via email to