GNU bug report logs -
#6999
saving included diary files does not regenerate the appointment list
Previous Next
Reported by: Leo <sdl.web <at> gmail.com>
Date: Wed, 8 Sep 2010 12:30:03 UTC
Severity: minor
Tags: patch
Found in version 23.2
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 6999 <at> debbugs.gnu.org (full text, mbox):
On 2010-09-08 13:31 +0100, Leo wrote:
> When the main diary file includes other diary files. File saving in the
> included does no appt-check, which means if one adds appointments
> directly into the included file, they will not be added by
> appt-update-list.
>
> One simple solution is to make appt-update-list do appt-check if major
> mode is diary-mode. Then users can open included files in diary mode and
> add appointments.
[...]
Annoyingly appt-check pops up the main diary buffer. So maybe do this
instead:
diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el
index 3573c95..32563ab 100644
--- a/lisp/calendar/appt.el
+++ b/lisp/calendar/appt.el
@@ -660,10 +660,11 @@ hour and minute parts."
(defun appt-update-list ()
"If the current buffer is visiting the diary, update appointments.
This function is intended for use with `write-file-functions'."
- (and (string-equal buffer-file-name (expand-file-name diary-file))
+ (and (or (string-equal buffer-file-name (expand-file-name diary-file))
+ (eq major-mode 'diary-mode))
appt-timer
(let ((appt-display-diary nil))
- (appt-check t)))
+ (save-window-excursion (appt-check t))))
nil)
;; In Emacs-21.3, the manual documented the following procedure to
This bug report was last modified 14 years and 257 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.