2

I recently started using orgmode and I wonder if there is any way to avoid scheduling (or deadlineing) tasks during my week of vacation. I already found a way to highlight regional holidays (followed by (calendar-mark-holidays).

Now I would like to also highlight my planned vacation or trigger a warning when I schedule a task in the week.

My specific questions would be:

  1. Is it at all possible to achieve something like this?
  2. If possible, how would I have to store (or schedule) my vacation within the org-document(s)?
  3. If possible, how could I ask the orgmode calendar to parse these dates and mark them / trigger a warning?

Let's assume I planned my vacation for one the time period

* Holidays
** Autumn Holiday
   <2019-10-07 Mon> - <2019-10-27 Sun>

1 Answer 1

1

I found a solution and will leave that here (in case any beginners like me search for that in the future). Yet, I will be happy to accept any other, probably more elegant, solution.

First create a diary file:

Ctrlx Ctrlf ~/.emacs.d/diary

Then add the entries according to the diary time format, e.g.:

%%(diary-block 10 07 2019 10 27 2019)   Vacation

Add the following lines to your configuration (or init.el):

(setq calendar-mark-diary-entries-flag t)
(setq org-agenda-include-diary t) ;; include the diary entries in agenda buffer

This displays the holidays in the popup calendar buffer and I will use that to avoid scheduling stuff during my vacation.

enter image description here

Your Answer

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

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