diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2015-02-22 17:26:21 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2015-02-22 17:26:21 +0100 |
commit | e4da74c452f945274a8586be2803ed6b3a31b0bc (patch) | |
tree | 8316ee7d78b80755942a28a817bd4c84ee17dc92 | |
parent | 6652baa39db26df8a8ac5dbbe40f3de91bf1a6b1 (diff) | |
download | org-mode-e4da74c452f945274a8586be2803ed6b3a31b0bc.tar.gz |
org-habit: Fix 6652baa39db26df8a8ac5dbbe40f3de91bf1a6b1
* lisp/org-habit.el (org-habit-parse-todo): Fix regexp introduced in
6652baa39db26df8a8ac5dbbe40f3de91bf1a6b1.
-rw-r--r-- | lisp/org-habit.el | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/lisp/org-habit.el b/lisp/org-habit.el index abbbe62..203ef27 100644 --- a/lisp/org-habit.el +++ b/lisp/org-habit.el @@ -199,23 +199,22 @@ This list represents a \"habit\" for the rest of this module." (limit (if reversed end (point))) (count 0) (re (format - "^[ \t]*-[ \t]+\\(?:%s\\)" - (mapconcat - (lambda (type) - (let ((value (cdr (assq type org-log-note-headings)))) - (when value - (org-replace-escapes - (regexp-quote value) - `(("%d" . ,org-ts-regexp-inactive) - ("%D" . ,org-ts-regexp) - ("%s" . "\"\\S-+\"") - ("%S" . "\"\\S-+\"") - ("%t" . ,org-ts-regexp-inactive) - ("%T" . ,org-ts-regexp) - ("%u" . ".*?") - ("%U" . ".*?")))))) - '(state done) - "\\|")))) + "^[ \t]*-[ \t]+\\(?:State \"%s\".*%s%s\\)" + (regexp-opt org-done-keywords) + org-ts-regexp-inactive + (let ((value (cdr (assq 'done org-log-note-headings)))) + (if (not value) "" + (concat "\\|" + (org-replace-escapes + (regexp-quote value) + `(("%d" . ,org-ts-regexp-inactive) + ("%D" . ,org-ts-regexp) + ("%s" . "\"\\S-+\"") + ("%S" . "\"\\S-+\"") + ("%t" . ,org-ts-regexp-inactive) + ("%T" . ,org-ts-regexp) + ("%u" . ".*?") + ("%U" . ".*?"))))))))) (unless reversed (goto-char end)) (while (and (< count maxdays) (funcall search re limit t)) (push (time-to-days |