Melleus writes:
Alexis <flexibe...@gmail.com> writes:
see that local holiday. To fix this, i use M-: to evaluate:
(setq calendar-holidays (append calendar-holidays
holiday-local-holidays))
Works perfectly this way, thank you.
jorge.alfaro-muri...@yale.edu (Jorge A. Alfaro-Murillo) writes:
They should show up after you restart emacs.
I supposed it should. But in fact in does not work.
holidays.el appends holiday-local-holidays to calendar-holidays
via a defcustom, so if you set holiday-local-holidays in your
.emacs, restart emacs and the local holidays are not in
calendar-holidays, it is because you are calling something that
loads holidays.el before you set holiday-local-holidays.
If you add the code above to your .emacs and later modify your
configuration and remove or move the part that loads holidays.el,
then either your code will fail (because calendar-holidays is not
yet defined) or calendar-holidays will have your local holidays
twice and they will show twice in your agenda.
I think that you should look for whatever calls holidays.el and
set holiday-local-holidays before that.
If not, then at least use eval-after-load so that
calendar-holidays is already defined when the code is run, and
add-to-list so that the entries do not get added twice if they are
already there:
#+BEGIN_SRC emacs-lisp
(eval-after-load 'holidays
'(dolist (holiday holiday-local-holidays)
(add-to-list 'calendar-holidays holiday))
#+END_SRC
Best,
--
Jorge.