Putting Holidays On The Calendar
So we have just tweaked my Emacs calendar a bit for better integration with Org Mode, but to make planning and scheduling easier, I want the local, Japanese holidays as well as the corporate ones to be shown and stand out. Both in the calendar as well as agenda views.
Good thing that Takashi Hattori wrote
japanese-holidays.el a while
ago. That saves us the trouble. This little Emacs add-on is now kept
up to date at GitHub. It doesn't change often but I keep up with
this repository via
mr with a stanza in my
vcsh pim module
and just add the checked out location to my
Unlike the recommendations in the upstream README, I prefer to initialize the local holidays with the Japanese ones because, well, they are local for me.
Corporate And Other Holidays
I use the
holiday-other-holidays variable to define company and
other holidays in a separate file. These are mostly related to the
Obon (お盆) and Year's End and New Year's (年末年始) periods but you
could also add your days off there is so inclined.
While the recurring holidays can just use a
one-off holidays should be added to
holiday-filter-visible-calendar. This gives something like:
Putting Things Together
Now we are ready to define the total list of
At the same time, we tweak a few look-and-feel variables. These
result in Sundays getting marked as holidays and Saturdays as
something that can be thought of as a semi-holiday. Not everyone
lives with the luxury of a five day workweek.
(setq calendar-holidays (append holiday-local-holidays holiday-other-holidays)) (setq mark-holidays-in-calendar t japanese-holiday-weekend '(0 6) japanese-holiday-weekend-marker '(holiday nil nil nil nil nil japanese-holiday-saturday)) (add-hook 'calendar-today-visible-hook 'calendar-mark-today) (add-hook 'calendar-today-visible-hook 'japanese-holiday-mark-weekend) (add-hook 'calendar-today-invisible-hook 'japanese-holiday-mark-weekend)
Finally, to make Org Mode aware of all the holidays as well, just put a headline with content like below in one of your agenda files.