16

As I had written in title, I need a little help with improvement of this sexp:

* TODO remeber about thingie.
  SCHEDULED: <%%(or (= 1 (calendar-day-of-week date)) 
                    (= 3 (calendar-day-of-week date)) 
                    (= 5 (calendar-day-of-week date)))>

Now it shows itself in the following days, but I would like to change two things about it:

  • How can I also schedule on specific hours (i.e. 18:00 - 20:00) in the following days

  • How can I made this task repeat itself, just like it repeats itself with

    <2010-05-13 Wed +1w>

    (by repetition I mean something like it automatically logs the closing date and time and comes back to the TODO state).

I will be grateful for any help.

Thanks.

zeroDivisible
  • 4,041
  • 8
  • 40
  • 62

3 Answers3

12
* TODO remeber about thingie.
  SCHEDULED: <2012-05-07 Mon 18:00 +1w>
  SCHEDULED: <2012-05-09 Wed 18:00 +1w>
  SCHEDULED: <2012-05-11 Fri 18:00 +1w>
abo-abo
  • 20,038
  • 3
  • 50
  • 71
  • 4
    This changes all the scheduled dates when it's marked as done by advancing each one week in the future. That's not a bad thing, I just hoped it would only advance one of the scheduled dates. – Joe Oct 24 '16 at 21:11
8

Unfortunately, you cannot use diary-sexps for repeating TODO items in org-mode like that. The work-around is to create three repeating TODO items, and use the normal org-mode date expressions, not diary sexps.

djcb
  • 389
  • 1
  • 4
8

If you don't need to mark task as DONE every day, you must simply write:

** remeber about thingie 1. 18:00-20:00
   <%%(and (memq (calendar-day-of-week date) '(1 3 5))
           (diary-block 03 26 2012 12 31 2012))>

In your case you have to use separated tasks:

** TODO remeber about thingie 2-1. 18:00-20:00
   SCHEDULED: <2012-03-26 Mon +1w>
** TODO remeber about thingie 2-3. 18:00-20:00
   SCHEDULED: <2012-03-28 Wed +1w>
** TODO remeber about thingie 2-5. 18:00-20:00
   SCHEDULED: <2012-03-30 Fri +1w>

Marking task as DONE (C-c C-t) your task will be changed automatically to:

** TODO remeber about thingie 2-5. 18:00-20:00
   SCHEDULED: <2012-04-06 Fri +1w>
   - State "DONE"       from "TODO"       [2012-03-30 Fri 12:34]
   :PROPERTIES:
   :LAST_REPEAT: [2012-03-30 Fri 12:34]
   :END:
aholub7x
  • 808
  • 12
  • 26