* Problem using calendar-check-holidays
@ 2011-10-04 14:24 Rüdiger Sonderfeld
2011-10-10 19:19 ` Rüdiger Sonderfeld
0 siblings, 1 reply; 2+ messages in thread
From: Rüdiger Sonderfeld @ 2011-10-04 14:24 UTC (permalink / raw)
To: help-gnu-emacs
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Problem using calendar-check-holidays
2011-10-04 14:24 Problem using calendar-check-holidays Rüdiger Sonderfeld
@ 2011-10-10 19:19 ` Rüdiger Sonderfeld
0 siblings, 0 replies; 2+ messages in thread
From: Rüdiger Sonderfeld @ 2011-10-10 19:19 UTC (permalink / raw)
To: help-gnu-emacs
Hello,
thanks to ashawley from the emacs IRC channel I found the problem:
calendar-check-holidays expects the date to be in gregorian.
(let ((calendar-holidays '((holiday-fixed 1 1 "New Year")))
(calendar-debug-sexp t)
(d '(1 1 2012)))
(calendar-check-holidays d))
Regards,
Rüdiger
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-10-10 19:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-04 14:24 Problem using calendar-check-holidays Rüdiger Sonderfeld
2011-10-10 19:19 ` Rüdiger Sonderfeld
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.