From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alexis Newsgroups: gmane.emacs.help,gmane.emacs.orgmode Subject: Re: [O] org-calendar-holiday and local holidays Date: Tue, 03 Mar 2015 09:23:18 +1100 Message-ID: <87sidn3up5.fsf@gmail.com> References: <87pp8sz70q.fsf@hornet.workgroup> <871tl8s0f0.fsf@gmail.com> <87y4nfzahe.fsf@yale.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-Trace: ger.gmane.org 1425335035 3017 80.91.229.3 (2 Mar 2015 22:23:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 Mar 2015 22:23:55 +0000 (UTC) Cc: help-gnu-emacs To: emacs-orgmode@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Mar 02 23:23:50 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YSYkf-0000qd-Se for geh-help-gnu-emacs@m.gmane.org; Mon, 02 Mar 2015 23:23:50 +0100 Original-Received: from localhost ([::1]:60057 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSYkf-0007oj-63 for geh-help-gnu-emacs@m.gmane.org; Mon, 02 Mar 2015 17:23:49 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39092) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSYkN-0007li-Vm for help-gnu-emacs@gnu.org; Mon, 02 Mar 2015 17:23:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YSYkM-0006Bx-PY for help-gnu-emacs@gnu.org; Mon, 02 Mar 2015 17:23:31 -0500 Original-Received: from mail-pd0-x229.google.com ([2607:f8b0:400e:c02::229]:35785) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSYkI-0006A5-1f; Mon, 02 Mar 2015 17:23:26 -0500 Original-Received: by pdbft15 with SMTP id ft15so17110681pdb.2; Mon, 02 Mar 2015 14:23:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:from:to:cc:subject:in-reply-to:date:message-id :mime-version:content-type; bh=CbsbNLjjYRB/biQzYeBnBNQ1w97P0TcVeHIP3XLx394=; b=cdYWVe9lbpdYwYR/Zocc853azfS5/oiHavGTuIDr/ylzEz8vYzxLAJvXbqoZNjZJwd sZXPxSWGmFfRve6yBq/MbavXYj7eaVe4j64g05PLpV9mwZItYJyUeZv4cbIcmhhJJmiN 7CRMD8qGNcCTn4+RA4dPySRp7m/uJUSN+T/RkUDUsa6okxQbBIEHl/JsQsiRXk+VKiE9 0B5xh9zb3oAslHQ5evt4hSwXaAAHjuMUKnvat1jGu4HIWm7maPIyqQG/aS/BDrwdEC0/ CIMX85rtFrF387Wg3CXAyp4w9P8XaSltiu5iE7m/yrk+a0+1os6C5FAAzVmcgGLx24uD GWTQ== X-Received: by 10.68.253.161 with SMTP id ab1mr27299336pbd.25.1425335005184; Mon, 02 Mar 2015 14:23:25 -0800 (PST) Original-Received: from localhost (ppp118-209-174-156.lns20.mel8.internode.on.net. [118.209.174.156]) by mx.google.com with ESMTPSA id di10sm13070717pad.41.2015.03.02.14.23.22 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 02 Mar 2015 14:23:23 -0800 (PST) In-reply-to: <87y4nfzahe.fsf@yale.edu> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c02::229 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:102986 gmane.emacs.orgmode:95594 Archived-At: On 2015-03-03T02:26:37+1100, Jorge A. Alfaro-Murillo said: JAA> Alexis writes: >> When i scroll down to look at the current value of >> `calendar-holidays`, however, i see that neither the current >> value nor the original value makes any reference to the >> `holiday-local-holidays` variable. And indeed, when i examine >> my agenda for next Monday, which is a local holiday i've >> specified in `holiday-local-holidays`, i can't see that local >> holiday. To fix this, i use M-: to evaluate: >> >> (setq calendar-holidays (append calendar-holidays >> holiday-local-holidays)) >> >> after which the local holiday next Monday appears in my Org >> agenda. JAA> You do not need to add that, calendar-holidays appends JAA> holiday-local-holidays when holidays.el is loaded, just restart JAA> emacs. Not in my Emacs (manually compiled 24.4.1, the most recent official stable release). My `local-holidays` variable was set for years, such that only as part of trying to help the OP did i notice that it's been obsoleted; the documentation for it says: This variable is an alias for `holiday-local-holidays'. This variable is obsolete since 23.1; use `holiday-local-holidays' instead. So i changed my init to refer to `holiday-local-holidays` instead of `local-holidays`, and restarted Emacs, and the issue persisted: the value of `holiday-local-holidays` is /not/ included in `calendar-holidays` by default. The `(setq calendar-holidays ...` line i described above is necessary to work around this. JAA> It is also not a documentation bug, at least in my emacs JAA> (25.0.50.1) the documentation of calendar-holidays says clearly: JAA> "Note that these variables [`holiday-other-holidays', JAA> `holiday-general-holidays', `holiday-local-holidays', JAA> `holiday-christian-holidays', `holiday-hebrew-holidays', JAA> `holiday-islamic-holidays', `holiday-bahai-holidays', JAA> `holiday-oriental-holidays' and `holiday-solar-holidays'] have JAA> no effect on `calendar-holidays' after it has been set JAA> (e.g. after the calendar is loaded). In that case, customize JAA> `calendar-holidays' directly." In 24.4.1, the documentation is phrased differently; it says: Additional holidays are easy to add to the list, just put them in the list `holiday-other-holidays' in your init file. Similarly, by setting any of `holiday-general-holidays', `holiday-local-holidays', `holiday-christian-holidays', `holiday-hebrew-holidays', `holiday-islamic-holidays', `holiday-bahai-holidays', `holiday-oriental-holidays', or `holiday-solar-holidays' to nil in your init file, you can eliminate unwanted categories of holidays. The aforementioned variables control the holiday choices offered by the function `holiday-list' when it is called interactively. They also initialize the default value of `calendar-holidays', which is the default list of holidays used by the function `holiday-list' in the non-interactive case. Note that these variables have no effect on `calendar-holidays' after it has been set (e.g. after the calendar is loaded). In that case, customize `calendar-holidays' directly. The intention is that (in the US) `holiday-local-holidays' be set in site-init.el and `holiday-other-holidays' be set by the user. It's the fact that, despite the above docstring, and that, as i described above, setting the value of `holiday-local-holidays` has no direct effect on `calendar-holidays` /even after a restart of Emacs/, that led me to suggest there might be a code bug or a documentation bug (e.g. maybe some variable needed to be set to `t` to ensure the value of `holiday-local-holidays` gets included in `calendar-holidays`). Since things work for you, and the phrasing for the documentation for `calendar-holidays` has changed between the most recent stable release and the development version of Emacs you're using, my guess is that there is indeed a bug in 24.4.1 and earlier that has subsequently been fixed. Later today i'll try building from the first 24.5 pretest and the master branch, and examine what happens with `holiday-local-holidays` / `calendar-holidays` in both instances. Alexis.