emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] [PATCH] updated patch to org-habit DONE keywords


From: Ted Wiles
Subject: [O] [PATCH] updated patch to org-habit DONE keywords
Date: Mon, 16 Dec 2013 09:55:26 -0500
User-agent: mu4e 0.9.9; emacs 24.3.1

Take care of all DONE keywords, not just the last one.

* lisp/org-habit.el

  This fixed a hard-coded TODO keyword
  in the org-habit code. Updated to apply to all DONE keywords, as per
  Aaron Ecay

  TINYCHANGE

---
 lisp/org-habit.el |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lisp/org-habit.el b/lisp/org-habit.el
index eba9037..63dd27f 100644
--- a/lisp/org-habit.el
+++ b/lisp/org-habit.el
@@ -200,9 +200,11 @@ 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))))
-- 
1.7.9.5

Attachment: 0001-Fix-a-hard-coded-TODO-keyword.patch
Description: 0001-Fix-a-hard-coded-TODO-keyword.patch


reply via email to

[Prev in Thread] Current Thread [Next in Thread]