Sometimes the habit is just temporarily inapplicable. For example you set a habit to clean your house once a day, however say you're out for vacation for 2 weeks, obviously you can't clean your house then, resulting in a false break. In some habit-tracking apps there's an option to "skip" certain days in the chain. Is there a way to achieve that in org-habit
?
2 Answers
You can just reschedule the item (with e.g. C-c C-s
) to the day you get home and want to start cleaning again. The item won't show up again until that new scheduled date and then the consistency chart will then show that the item is not due on the intervening dates (i.e. they are coloured blue):
** TODO clean house
SCHEDULED: <2015-07-14 Sat .+4d/6d>
:LOGBOOK:
- CLOSING NOTE [2015-07-01 Wed 14:29]
- CLOSING NOTE [2015-06-30 Tue 14:29]
- CLOSING NOTE [2015-06-15 Mon 14:29]
- CLOSING NOTE [2015-06-10 Wed 14:29]
- CLOSING NOTE [2015-06-02 Tue 14:29]
- CLOSING NOTE [2015-05-29 Fri 14:29]
:END:
:PROPERTIES:
:STYLE: habit
:LAST_REPEAT: [2015-07-01 Wed 14:29]
:END:
-
Doesn't seem to work if I didn't set the date in advance, but instead can only edit the orgmode files after I'm back?– xjiJul 16, 2015 at 9:49
-
-
What I mean is that this solution seems to work if I plan in advance and know how many days I'm going to be absent. However what if I couldn't know it in advance and can only make edits after I have come back.– xjiJul 16, 2015 at 13:24
-
I'm not sure if that's the case of course. Maybe if I change the scheduled date after I come back it still works. Though it seems that my current attempts haven't been successful and the color remained red instead of blue.– xjiJul 16, 2015 at 13:24
-
1Resceduling when you get back works just as well, you have to just reload the agenda to see the new colours. The colours are determined by the data in the
LOGBOOK
entries,LAST_REPEAT
field, and the scheduled date; none of these bits of data change while you are away, scheduling can be done at any time. Jul 16, 2015 at 14:07
You might use a sequence of states that includes "SKIP".
For example, at the top of my .org file I have
#+TODO: TODO(t) WAIT(w@/!) | DONE(d!) CANCELED(c@) SKIP(s@)
Then you can use C-c C-t s
from within the .org file, or t s
from the agenda view to "skip" the occurrence of the habit, advancing it to the next scheduled date. Note that the @
sign in the state descriptor allows you to enter a comment for why you skipped.
See also Using TODO states and Tracking TODO state changes in the org mode guide.
-
Unfortunately, setting any of the closing states marks a habit as done for the day. A
SKIP
state doesn't work for me. But anyway, I have a separate todo state for habits, I make a transition back to it, not toDONE
, when I skip a day, and my logbook entry looks like- State "HABIT" from "HABIT" [2021-08-30 Mon 13:00]
, with a comment why skipped it.– koddoAug 30, 2021 at 10:08 -
UPDATE: It seems suitable for me, not for the OP, but I'm leaving this comment, as it's still an option.– koddoAug 30, 2021 at 10:15