12

I began exploring org-mode lately and I love it. But, I'd like to know how I can have more control over repeating tasks, like if I've set a task to repeat everyday, how can I make it exclude weekends?

Also, is there a option like a holiday mode or something similar which when turned on asks for the duration i'll be away and all my repeating tasks(if I have any that are scheduled during the time I take off) are rescheduled automatically to the next scheduled day after the holiday ends.

2 Answers 2

2

My solution:

  1. Tag items 'winter', 'weekends', 'schoolnights', etc.

  2. Make sure each of these tags has an associated speed-key in org-tag-alist.

  3. Write a predicate for each tag that tells you if it is not current: not-winter-p (returning non-nil between April and November in the northern hemisphere), weekdayp, not-schoolnight-p, etc.

  4. Put it all together in your own agenda command:

(Ah-ha! Discovered I have to put non-numbered-list text here to make following code appear properly formatted)

(defun ph/agenda ()
  "Display my agenda."
  (interactive)
  (org-agenda-list)
  (cl-loop
    for (predicate . speed-key)
    in
    '((weekendp . ?\[)
      (winterp . ?\])
      (not-schoolday-p . ?\{)
      (not-schoolnight-p . ?\}))
    when (funcall predicate)
    do (org-agenda-filter-by-tag nil speed-key 'exclude)))
0

You could use diary dates. I have an event that happens every 1st, 3rd, and 5th Friday of the month.

* Music Jam
   <%%(diary-float t 5 1)>
   <%%(diary-float t 5 3)> 
   <%%(diary-float t 5 5)>

There are other diary functions too. diary-float, diary-remind, diary-cyclic, etc. You can read more about this via

      M-x info RET org RET m Agenda  

Search for diary, and you'll find it. (C-s diary)

1
  • I think that’s not possible out of the box. You need to iterate over all your agenda files, in them iterate over all headlines, and if there is scheduling info, reschedule the item. Also, rescheduling everything to the same day may result in a crowded day, so you may also want to deal with that. Commented Nov 9, 2016 at 7:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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