From: Alexis <flexibeast@gmail.com> To: emacs-orgmode@gnu.org Cc: help-gnu-emacs <help-gnu-emacs@gnu.org> Subject: Re: [O] org-calendar-holiday and local holidays Date: Tue, 03 Mar 2015 09:23:18 +1100 [thread overview] Message-ID: <87sidn3up5.fsf@gmail.com> (raw) In-Reply-To: <87y4nfzahe.fsf@yale.edu> 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.
WARNING: multiple messages have this Message-ID (diff)
From: Alexis <flexibeast@gmail.com> To: emacs-orgmode@gnu.org Cc: help-gnu-emacs <help-gnu-emacs@gnu.org> Subject: Re: org-calendar-holiday and local holidays Date: Tue, 03 Mar 2015 09:23:18 +1100 [thread overview] Message-ID: <87sidn3up5.fsf@gmail.com> (raw) In-Reply-To: <87y4nfzahe.fsf@yale.edu> 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.
next prev parent reply other threads:[~2015-03-02 22:23 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-03-01 22:29 org-calendar-holiday and local holidays Melleus 2015-03-02 0:33 ` [O] " Alexis 2015-03-02 0:33 ` Alexis 2015-03-02 15:26 ` Jorge A. Alfaro-Murillo 2015-03-02 22:23 ` Alexis [this message] 2015-03-02 22:23 ` Alexis 2015-03-02 17:32 ` Melleus 2015-03-02 21:58 ` Jorge A. Alfaro-Murillo 2015-03-02 22:54 ` [O] " Alexis 2015-03-02 22:54 ` Alexis 2015-03-02 23:53 ` [O] " Jorge A. Alfaro-Murillo 2015-03-02 23:53 ` Jorge A. Alfaro-Murillo 2015-03-03 13:43 ` Melleus 2015-03-02 1:40 ` Nick Dokos 2015-03-02 15:34 ` Jorge A. Alfaro-Murillo 2015-03-02 17:30 ` Melleus
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=87sidn3up5.fsf@gmail.com \ --to=flexibeast@gmail.com \ --cc=emacs-orgmode@gnu.org \ --cc=help-gnu-emacs@gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.