summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Wiles <thewiles@wharton.upenn.edu>2013-12-23 00:10:44 +0100
committerBastien Guerry <bzg@altern.org>2013-12-23 00:10:44 +0100
commita7417ffcdba4f0b1c3ff9516a7464b0c3a629383 (patch)
treea5215923ae86ce78a73670bd1427029324404a52
parent6999c5cc84c4802ff6468243d44bc76d88936a19 (diff)
downloadorg-mode-a7417ffcdba4f0b1c3ff9516a7464b0c3a629383.tar.gz
org-habit.el (org-habit-parse-todo): Match all TODO keywords, not just "TODO"
* org-habit.el (org-habit-parse-todo): Match all TODO keywords, not just "TODO". TINYCHANGE
-rw-r--r--lisp/org-habit.el10
1 files changed, 8 insertions, 2 deletions
diff --git a/lisp/org-habit.el b/lisp/org-habit.el
index eba9037..1eb5160 100644
--- a/lisp/org-habit.el
+++ b/lisp/org-habit.el
@@ -200,9 +200,15 @@ This list represents a \"habit\" for the rest of this module."
(count 0))
(unless reversed (goto-char end))
(while (and (< count maxdays)
- (funcall search "- State \"DONE\".*\\[\\([^]]+\\)\\]" limit t))
+ (funcall
+ search
+ (format "- State \"%s\".*\\[\\([^]]+\\)\\]"
+ (concat "\\("
+ (mapconcat 'regexp-quote
+ org-done-keywords "\\|") "\\)"))
+ limit t))
(push (time-to-days
- (org-time-string-to-time (match-string-no-properties 1)))
+ (org-time-string-to-time (match-string-no-properties 2)))
closed-dates)
(setq count (1+ count))))
(list scheduled sr-days deadline dr-days closed-dates))))