Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem using calendar-check-holidays

1 view
Skip to first unread message

Rüdiger Sonderfeld

unread,
Oct 4, 2011, 10:24:42 AM10/4/11
to help-gn...@gnu.org
Hello,
I'm trying to check whether a certain date is a holiday. I'm using
calendar-check-holidays, but it fails to handle my holiday list.

Here is a simple example to demonstrate the problem

(let ((calendar-holidays '((holiday-fixed 1 1 "New Year")))
(calendar-debug-sexp t)
(d (calendar-absolute-from-gregorian '(1 1 2012))))
(calendar-check-holidays (list d)))

I get the following backtrace

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
holiday-fixed(1 1 "New Year")
eval((holiday-fixed 1 1 "New Year"))
calendar-holiday-list()
calendar-check-holidays((734503))
(let ((calendar-holidays (quote ((holiday-fixed 1 1 "New Year"))))
(calendar-debug-sexp t) (d (calendar-absolute-from-gregorian (quote (1 1
2012))))) (calendar-check-holidays (list d)))
eval((let ((calendar-holidays (quote ((holiday-fixed 1 1 "New Year"))))
(calendar-debug-sexp t) (d (calendar-absolute-from-gregorian (quote (1 1
2012))))) (calendar-check-holidays (list d))) nil)
eval-last-sexp-1(nil)
eval-last-sexp(nil)
call-interactively(eval-last-sexp nil nil)

I'm using (emacs-version) => GNU Emacs 24.0.50.1 (x86_64-pc-linux-gnu, GTK+
Version 2.24.4) of 2011-09-26 on dfontaine-laptop, modified by Debian

What am I doing wrong and how to correctly use calendar-check-holidays?

btw. it would be great if one could specify the list of holidays
calendar-check-holidays should use.

Regards,
Rüdiger


Glenn Morris

unread,
Oct 4, 2011, 1:57:38 PM10/4/11
to
Rüdiger Sonderfeld wrote:

> (calendar-check-holidays (list d)))

That should be

(calendar-check-holidays '(1 1 2012))

(The current doc is clearer on this.)
0 new messages