[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] org-calendar-holiday and local holidays

From: Alexis
Subject: Re: [O] org-calendar-holiday and local holidays
Date: Mon, 02 Mar 2015 11:33:39 +1100

[Crossposted to the help-gnu-emacs list, for possible advice on whether or not this involves a bug in GNU Emacs.]

On 2015-03-02T09:29:09+1100, Melleus said:

M> I'm afraid to ask. But... Anyway. Does %%(org-calendar-holiday) M> know about holiday-local-holidays? I'm not programmer, sorry. I've M> set up those local holidays but cannot see them in my agenda.

You can examine the definition of an ELisp function by:

1. typing C-h f whilst on a function;
2. typing RET to take you to the documentation for that function;
3. typing TAB then RET to take you to the function definition.

Starting with point on `org-calendar-holiday`, we find that:

- `org-calendar-holiday` calls (if available) `calendar-check-holidays` or (otherwise) `check-calendar-holidays`;

- `calendar-check-holidays` calls `calendar-holiday-list`;

- `calendar-holiday-list` makes use of the `calendar-holidays` variable.

We can examine the documentation for the `calendar-holidays` variable by moving point onto and typing C-h v RET. On my setup (manually compiled Emacs 24.4.1 on Debian Wheezy(+updates) x86_64 together with Org 20150223), the documentation suggests that `calendar-holidays` makes use of the `holiday-local-holidays` variable; and the documentation for `holiday-local-holidays` merely refers us back to the documentation for `calendar-holidays`.

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.

Given the documentation for the `calendar-holidays` variable, the fact that i need to manually add the value of the `holiday-local-holidays` variable to `calendar-holidays` seems to me like it might be a coding or documentation bug in Emacs .... ?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]