|
From: | Jorge A. Alfaro-Murillo |
Subject: | Re: [O] org-calendar-holiday and local holidays |
Date: | Mon, 02 Mar 2015 16:58:20 -0500 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Melleus writes:
Alexis <address@hidden> 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. address@hidden (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.
[Prev in Thread] | Current Thread | [Next in Thread] |