emacs-pretest-bug
[Top][All Lists]
Advanced

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

Missing day when Calendar prompts for year and month


From: Stephen Berman
Subject: Missing day when Calendar prompts for year and month
Date: Tue, 09 May 2006 23:30:56 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

1. emacs -Q
2. Eval (setq view-diary-entries-initially t)
3. Type C-u M-x calendar and enter a year and a month at the prompts
==> Wrong type argument: number-or-marker-p, nil

The problem is in calendar-basic-setup: with the prefix argument, the
sexp (calendar-read-date t) gets evalled, and this returns a date list
whose day member is nil, and with view-diary-entries-initially set to
t, the call to calendar-date-is-visible-p barfs on the nil day.  Since
generate-calendar-window with the provided month and year arguments
sets the day to 1, the simplest fix may be this:

*** /emacs/lisp/calendar/calendar.el.~1.184.~   2006-04-16 17:23:53.000000000 
+0200
--- /emacs/lisp/calendar/calendar.el    2006-05-09 23:20:18.000000000 +0200
***************
*** 1642,1647 ****
--- 1642,1648 ----
      (pop-to-buffer calendar-buffer)
      (increment-calendar-month month year (- calendar-offset))
      (generate-calendar-window month year)
+     (setcar (cdr date) 1)
      (if (and view-diary-entries-initially (calendar-date-is-visible-p date))
          (diary-view-entries)))
    (let* ((diary-buffer (get-file-buffer diary-file))


In GNU Emacs 22.0.50.14 (i686-pc-linux-gnu, GTK+ Version 2.8.10)
 of 2006-04-17 on escher
X server distributor `The X.Org Foundation', version 11.0.60802000
configured using `configure '--with-x-toolkit=gtk''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8
  default-enable-multibyte-characters: t

Major mode: Emacs-Lisp

Minor modes in effect:
  eldoc-mode: t
  senator-minor-mode: t
  semantic-idle-summary-mode: t
  semantic-idle-scheduler-mode: t
  tabbar-mwheel-mode: t
  tabbar-mode: t
  recentf-mode: t
  show-paren-mode: t
  display-time-mode: t
  tooltip-mode: t
  auto-compression-mode: t
  tool-bar-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  column-number-mode: t
  line-number-mode: t

Recent input:
<down> <up> <down> <up> <up> <down> C-g <S-left> <S-left> 
<down-mouse-1> <mouse-movement> <mouse-movement> <drag-mouse-1> 
<help-echo> <f11> * s <tab> <return> <return> <return> 
C-y <down-mouse-1> <mouse-1> <down-mouse-1> <mouse-1> 
<double-down-mouse-1> <double-mouse-1> <f11> <return> 
<down-mouse-1> <mouse-1> <double-down-mouse-1> <double-mouse-1> 
<down-mouse-1> <mouse-movement> <drag-mouse-1> <down-mouse-1> 
<mouse-movement> <mouse-movement> <drag-mouse-1> <down-mouse-1> 
<mouse-1> <down-mouse-1> <mouse-1> <down-mouse-1> <mouse-movement> 
<mouse-1> M-: <up> <up> <up> <up> <down> <down> <down> 
<down> <down> <up> <up> <up> <help-echo> <down-mouse-1> 
<mouse-1> <double-down-mouse-1> <double-mouse-1> <select-window> 
C-g <down> <down> <down> <down> <left> <left> <left> 
<return> <up> C-y <tab> C-x C-s <help-echo> <help-echo> 
<help-echo> <help-echo> <select-window> <help-echo> 
<down-mouse-1> <mouse-1> M-x r e p o <tab> r <tab> 
b <tab> <return>

Recent messages:
Auto-saving...done
Auto-saving...done
next-history-element: End of history; no default available
Quit
Mark set
Saving file /home/steve/lib/site-lisp/calendar.el...
Wrote /home/steve/lib/site-lisp/calendar.el
Auto-saving...
Making completion list...
Loading emacsbug...done




reply via email to

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