From mboxrd@z Thu Jan 1 00:00:00 1970 From: jorge.alfaro-murillo@yale.edu (Jorge A. Alfaro-Murillo) Subject: Re: org-calendar-holiday and local holidays Date: Mon, 02 Mar 2015 16:58:20 -0500 Message-ID: <87sidn83k3.fsf@yale.edu> References: <87pp8sz70q.fsf@hornet.workgroup> <871tl8s0f0.fsf@gmail.com> <87r3t7z4o4.fsf@hornet.workgroup> Mime-Version: 1.0 Content-Type: text/plain; format=flowed Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59505) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSYMK-0003tj-90 for emacs-orgmode@gnu.org; Mon, 02 Mar 2015 16:58:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YSYMG-0003eD-Vf for emacs-orgmode@gnu.org; Mon, 02 Mar 2015 16:58:40 -0500 Received: from plane.gmane.org ([80.91.229.3]:58356) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSYMG-0003dL-OV for emacs-orgmode@gnu.org; Mon, 02 Mar 2015 16:58:36 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YSYME-0006Sj-1x for emacs-orgmode@gnu.org; Mon, 02 Mar 2015 22:58:34 +0100 Received: from nat-130-132-173-151.central.yale.edu ([130.132.173.151]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 02 Mar 2015 22:58:34 +0100 Received: from jorge.alfaro-murillo by nat-130-132-173-151.central.yale.edu with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 02 Mar 2015 22:58:34 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Cc: help-gnu-emacs@gnu.org Melleus writes: > Alexis 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-murillo@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.