|
| From: | David Maus |
| Subject: | Re: [Orgmode] Re: Force completed habits to revert to "HABIT" todo keyword instead of "TODO" |
| Date: | Tue, 09 Nov 2010 22:09:53 +0100 |
| User-agent: | Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.8 Emacs/23.2 (i486-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) |
Sorry, I couldn't help myself:
(defun hb:set-habit-keyword-2 ()
"*Reset keyword of done habit."
(let ((reset-to (org-entry-get nil "REPEAT_TO_STATE")))
(if (and reset-to (string= state "DONE"))
(org-todo reset-to))))
(add-hook 'org-after-todo-state-change-hook 'hb:set-habit-keyword-2)
Every time a todo turns into DONE, this function is run and sets the
keyword to whatever is stored in REPEAT_TO_STATE.
Best,
-- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... address@hidden
Email..... address@hidden
| [Prev in Thread] | Current Thread | [Next in Thread] |