From bc3c021d06bb6f0b5971959f769216defae200bd Mon Sep 17 00:00:00 2001 From: Mats Kindahl To: emacs-orgmode@gnu.org Date: Sun, 9 Sep 2012 21:53:45 +0200 Subject: [PATCH] Resolved regexp ambiguity for item headers X-IMAPbase: 1347255850 2 Status: O X-UID: 1 * lisp/org.el (org-complex-heading-regexp): Resolve ambiguity in heading regexp in favor of keywordless headline When a simple headline is provided that just contain a todo keyword, the regular expression will match so that the heading is treated as containing just a keyword and no headline. Since org-column-compact-links only accept a headline text (and not nil), this causes problems with called from org-columns-cleanup-item. This occurs if a 'columnview' dynamic block is used to capture a column view. This patch solves the problem by re-writing the org-complex-heading-regexp to require a headline text instead of allowing it to be optional. This means that items containing only a single word that also happens to be a todo keyword is interpreted as a headline with no todo keyword and just a headline text. --- lisp/org.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index fef7597..e990f49 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -4824,7 +4824,7 @@ but the stars and the body are.") (concat "^\\(\\*+\\)" "\\(?: +" org-todo-regexp "\\)?" "\\(?: +\\(\\[#.\\]\\)\\)?" - "\\(?: +\\(.*?\\)\\)?" + " +\\(.+?\\)" (org-re "\\(?:[ \t]+\\(:[[:alnum:]_@#%:]+:\\)\\)?") "[ \t]*$") org-complex-heading-regexp-format -- 1.7.9.5