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: Mon, 02 Mar 2015 11:33:39 +1100 Message-ID: <871tl8s0f0.fsf@gmail.com> References: <87pp8sz70q.fsf@hornet.workgroup> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-Trace: ger.gmane.org 1425256462 27083 80.91.229.3 (2 Mar 2015 00:34:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 Mar 2015 00:34:22 +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 01:34:15 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 1YSEJJ-0007HS-Rx for geh-help-gnu-emacs@m.gmane.org; Mon, 02 Mar 2015 01:34:13 +0100 Original-Received: from localhost ([::1]:54515 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSEJJ-0003O1-3k for geh-help-gnu-emacs@m.gmane.org; Sun, 01 Mar 2015 19:34:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60042) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSEJ0-0003MK-0s for help-gnu-emacs@gnu.org; Sun, 01 Mar 2015 19:33:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YSEIy-0000Uv-6y for help-gnu-emacs@gnu.org; Sun, 01 Mar 2015 19:33:53 -0500 Original-Received: from mail-pa0-x231.google.com ([2607:f8b0:400e:c03::231]:43220) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSEIt-0000UB-05; Sun, 01 Mar 2015 19:33:47 -0500 Original-Received: by pablj1 with SMTP id lj1so208422pab.10; Sun, 01 Mar 2015 16:33:45 -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=rZU5lXJzHb7UiN9h4xToCpGeDzj7sQz4HvO7OMrj0JI=; b=FKcWoDGhPcCIJP4QSnfP3lKiT5pogYysCJOygD45wsHkouS1gyiYGAEw1l9C3fl8RJ PJso/Y4litAJTkCwjkcJd27LuZZX0UuEVQdVLUh/XZXO4NYBAMoYSElvO4/iOK6kBLIF Sl3hCErvL8+Ro+7AyiSmQh/zCT0WevVW7NVBS6dFqTgVFhYv4NgMHhvoncIJVWwGkPuh 8j5QoG8kXkEGhaj1nA8AQu0jl/TaKHgMulmAO522pEkWoMEEmzP4gMCowilqlt0ZNAlO VMtVOW56t6bAM9V7gLcWwE7ihlFxhaIVcRzhiEz232hgXkG4gNSdye1RWp7ojjMrrjsp mCMA== X-Received: by 10.66.158.66 with SMTP id ws2mr41630810pab.37.1425256425490; Sun, 01 Mar 2015 16:33:45 -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 p4sm10039629pdl.87.2015.03.01.16.33.43 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 01 Mar 2015 16:33:44 -0800 (PST) In-reply-to: <87pp8sz70q.fsf@hornet.workgroup> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c03::231 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:102966 gmane.emacs.orgmode:95549 Archived-At: [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 .... ? Alexis. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexis Subject: Re: org-calendar-holiday and local holidays Date: Mon, 02 Mar 2015 11:33:39 +1100 Message-ID: <871tl8s0f0.fsf@gmail.com> References: <87pp8sz70q.fsf@hornet.workgroup> Mime-Version: 1.0 Content-Type: text/plain; format=flowed Return-path: In-reply-to: <87pp8sz70q.fsf@hornet.workgroup> 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 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Cc: help-gnu-emacs List-Id: emacs-orgmode.gnu.org [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 .... ? Alexis.