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.... dmj...@jabber.org
Email..... dm...@ictsoc.de

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to