From d059b7895ba71744de0a7502a5a9fe78c36c93fe Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Fri, 8 Sep 2017 21:18:22 +0200 Subject: [PATCH] org-agenda: Better state change detection * lisp/org-agenda.el (org-agenda-get-progress): Use appropriate regexp as TODO keywords are not limited to alphanumeric characters. Reported-by: email@edgar-kalkowski.de --- lisp/org-agenda.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 7f3fec443..31633d7a7 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -5728,7 +5728,8 @@ then those holidays will be skipped." (list (if (memq 'closed items) (concat "\\<" org-closed-string)) (if (memq 'clock items) (concat "\\<" org-clock-string)) - (if (memq 'state items) "- State \"\\([a-zA-Z0-9]+\\)\".*?")))) + (if (memq 'state items) + (format "- State \"%s\".*?" org-todo-regexp))))) (parts-re (if parts (mapconcat 'identity parts "\\|") (error "`org-agenda-log-mode-items' is empty"))) (regexp (concat