From: Ted Wiles <thewiles@wharton.upenn.edu>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: [PATCH] quick patch to org-habit todo state keywords
Date: Sun, 15 Dec 2013 22:24:36 -0500 [thread overview]
Message-ID: <87haa9a363.fsf@dorewiles.com> (raw)
In-Reply-To: <87fvptfpuy.fsf@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 868 bytes --]
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)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Took-out-the-hardcoded-todo-state.patch --]
[-- Type: text/x-diff; name="0001-Took-out-the-hardcoded-todo-state.patch", Size: 907 bytes --]
From 1f486cdb5fffd83cd0fc065e86be4032fc368ee7 Mon Sep 17 00:00:00 2001
From: Theodore Wiles <theodore.wiles@gmail.com>
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
next prev parent reply other threads:[~2013-12-16 3:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-11 2:30 [parser] subscripts and underlines interacting badly Aaron Ecay
2013-12-11 8:22 ` Nicolas Goaziou
2013-12-11 18:36 ` Aaron Ecay
2013-12-11 20:55 ` Nicolas Goaziou
2013-12-12 7:56 ` Aaron Ecay
2013-12-12 17:33 ` Nicolas Goaziou
2013-12-12 19:42 ` Aaron Ecay
2013-12-12 20:47 ` Nicolas Goaziou
2013-12-16 3:15 ` Aaron Ecay
2013-12-16 3:24 ` Ted Wiles [this message]
2013-12-16 4:27 ` [PATCH] quick patch to org-habit todo state keywords Aaron Ecay
2013-12-17 16:57 ` [parser] subscripts and underlines interacting badly Nicolas Goaziou
2013-12-18 6:57 ` Aaron Ecay
2013-12-18 15:01 ` Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87haa9a363.fsf@dorewiles.com \
--to=thewiles@wharton.upenn.edu \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).