emacs-orgmode
[Top][All Lists]
Advanced

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

[O] [PATCH] quick patch to org-habit todo state keywords


From: Ted Wiles
Subject: [O] [PATCH] quick patch to org-habit todo state keywords
Date: Sun, 15 Dec 2013 22:24:36 -0500
User-agent: mu4e 0.9.9; emacs 24.3.1

Took out the hardcoded todo-state

* lisp/org-habit.el 

  The "DONE" keyword was hardcoded in. This is my first patch (ever, to 
anything).

  TINYCHANGE

1 file changed, 2 insertions(+), 1 deletion(-)
 lisp/org-habit.el |    3 ++-

        Modified   lisp/org-habit.el
diff --git a/lisp/org-habit.el b/lisp/org-habit.el
index eba9037..69d0fa6 100644
--- a/lisp/org-habit.el
+++ b/lisp/org-habit.el
@@ -200,7 +200,8 @@ 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\".*\\[\\([^]]+\\)\\]" 
+                                           (car (reverse (car 
org-todo-keywords)))) limit t))
          (push (time-to-days
                 (org-time-string-to-time (match-string-no-properties 1)))
                closed-dates)



>From 1f486cdb5fffd83cd0fc065e86be4032fc368ee7 Mon Sep 17 00:00:00 2001
From: Theodore Wiles <address@hidden>
Date: Sun, 15 Dec 2013 21:56:25 -0500
Subject: [PATCH] Took out the hardcoded todo-state.

---
 lisp/org-habit.el |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/org-habit.el b/lisp/org-habit.el
index eba9037..69d0fa6 100644
--- a/lisp/org-habit.el
+++ b/lisp/org-habit.el
@@ -200,7 +200,8 @@ 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\".*\\[\\([^]]+\\)\\]" 
+                                           (car (reverse (car 
org-todo-keywords)))) limit t))
          (push (time-to-days
                 (org-time-string-to-time (match-string-no-properties 1)))
                closed-dates)
-- 
1.7.9.5


reply via email to

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