emacs-orgmode
[Top][All Lists]
Advanced

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

[Orgmode] Re: Force completed habits to revert to "HABIT" todo keyword i


From: Matt Lundin
Subject: [Orgmode] Re: Force completed habits to revert to "HABIT" todo keyword instead of "TODO"
Date: Tue, 09 Nov 2010 15:26:32 -0500
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux)

Hi Joseph,

Joseph Buchignani <address@hidden> writes:

> Summary: I would like habits to automatically be marked as the todo
> keyword "HABIT" instead of "TODO" after I mark them "DONE"
>
> Reasons:
> I want to keep my habits separate from my tasks. But they display
> together on my TODO list. This makes it hard to keep track of what's a
> habit and what's not.
>
> I could change a setting so that scheduled tasks are no longer
> considered open. But then I lose the ability to see all my habits in a
> list on the TODO view.
>
> Also, I like to see habits clearly marked HABIT instead of TODO in my
> org outline.
>
> Keeping the keywords separated fits better with my workflow. Normally I
> only need to work on habits from within the org agenda, not the todo
> list. For example, I start the day by executing scheduled tasks, then
> priority A tasks, then priority A habits, etc.
>
> Is there some setting I can change to do this? Right now I am doing it
> manually.

Apologies for the late reply, but one simple way to make sure repeating
habits return to a HABIT state is to add a REPEAT_TO_STATE property to
each of your habits. (Of course, HABIT needs to be defined in your
org-todo-keywords.)

E.g.,

--8<---------------cut here---------------start------------->8---
* HABIT Run
  SCHEDULED: <2010-11-09 Tue .+1d/2d>
  :PROPERTIES:
  :STYLE:    habit
  :REPEAT_TO_STATE: HABIT
  :END:
--8<---------------cut here---------------end--------------->8---

If you want to do this quickly for all existing habits you could
evaluate the following:

--8<---------------cut here---------------start------------->8---
(org-map-entries '(org-set-property "REPEAT_TO_STATE" "HABIT") 
                 "+STYLE=\"HABIT\"" 'agenda)
--8<---------------cut here---------------end--------------->8---

Best,
Matt



reply via email to

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