浏览代码

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
Ted Wiles 11 年之前
父节点
当前提交
a7417ffcdb
共有 1 个文件被更改,包括 8 次插入2 次删除
  1. 8 2
      lisp/org-habit.el

+ 8 - 2
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))))