GNU bug report logs - #8920
24.0.50; Calendar raises error with #included diary file

Previous Next

Package: emacs;

Reported by: Stephen Berman <stephen.berman <at> gmx.net>

Date: Wed, 22 Jun 2011 23:04:02 UTC

Severity: normal

Found in version 24.0.50

Done: Stephen Berman <stephen.berman <at> gmx.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stephen Berman <stephen.berman <at> gmx.net>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 8920 <at> debbugs.gnu.org
Subject: bug#8920: 24.0.50; Calendar raises error with #included diary file
Date: Sat, 25 Jun 2011 22:18:08 +0200
On Fri, 24 Jun 2011 23:32:31 +0200 Stephen Berman <stephen.berman <at> gmx.net> wrote:

> On Fri, 24 Jun 2011 14:49:43 -0400 Glenn Morris <rgm <at> gnu.org> wrote:
>
>> Stephen Berman wrote:
>>
>>> (add-hook 'find-file-hook
>>> 	  (lambda () (set-window-buffer (selected-window)
>>> 					(set-buffer (current-buffer)))))
>>
>> Help me out: what is this supposed to be for?
[...]
> my intention was to invoke todo-show when the user chooses to visit a
> todo file directly (instead of interactively calling todo-show); I
> didn't consider the case where the file is visited programmatically.  I
> don't know how to distinguish the two cases in this context;
> called-interactively-p won't DTRT, precisely because the command the
> user invokes to visit the file is not part of Todo mode.  So I'm hoping
> there's a way within calendar.el to avoid the error.

The following patch to calendar-generate-window fixes the problem for
me, and seems like it shouldn't cause problems elsewhere.

Steve Berman


*** /home/steve/bzr/emacs/trunk/lisp/calendar/calendar.el	2011-06-04 12:27:38.000000000 +0200
--- /home/steve/bzr/emacs/quickfixes/lisp/calendar/calendar.el	2011-06-25 22:10:04.000000000 +0200
***************
*** 1392,1398 ****
           (calendar-mark-holidays)
           (and in-calendar-window (sit-for 0)))
      (unwind-protect
!         (if calendar-mark-diary-entries-flag (diary-mark-entries))
        (if today-visible
            (run-hooks 'calendar-today-visible-hook)
          (run-hooks 'calendar-today-invisible-hook)))))
--- 1392,1401 ----
           (calendar-mark-holidays)
           (and in-calendar-window (sit-for 0)))
      (unwind-protect
!         (if calendar-mark-diary-entries-flag
! 	    (save-selected-window
! 	      (save-excursion
! 		(diary-mark-entries))))
        (if today-visible
            (run-hooks 'calendar-today-visible-hook)
          (run-hooks 'calendar-today-invisible-hook)))))




This bug report was last modified 14 years and 31 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.