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


Message #17 received at 8920 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Stephen Berman <stephen.berman <at> gmx.net>
Cc: 8920 <at> debbugs.gnu.org
Subject: Re: bug#8920: 24.0.50; Calendar raises error with #included diary file
Date: Sat, 25 Jun 2011 18:25:18 -0400
Stephen Berman wrote:

> *** /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)))))



I don't like this, because IIUC, this is only needed because of the:

(find-file-noselect (diary-check-diary-file) t)

in diary-mark-entries.

It should be implicit that find-file-noselect does not mess with the
window layout, and we should not need to wrap every call to it in save-*
constructs to guard against inappropriate find-file-hooks.

I've made some changes to diary-lib.el that mean there is no longer an
error in the initial example; however the calendar buffer ends up being
replaced with the diary buffer.

I didn't read in detail all that you want to do, but I think the only
way you can do it at present is by advising find-file rather than using
find-file-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.