7

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?

8

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):

Sample output

** 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? – xji Jul 16 '15 at 9:49
  • Can you explain your work flow? Your comment is unclear to me. – Andrew Swann Jul 16 '15 at 12:09
  • 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. – xji Jul 16 '15 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. – xji Jul 16 '15 at 13:24
  • 1
    Resceduling 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. – Andrew Swann Jul 16 '15 at 14:07
4

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.