Subject: bug#6999: closed (Re: bug#6999: 23.2; [PATCH] appt ignores included diary files)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 15 Sep 2010 02:48:02 +0000

Your bug report

#6999: saving included diary files does not regenerate the appointment list

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
6999: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6999
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#6999: 23.2; [PATCH] appt ignores included diary files
From: Glenn Morris <[email-masked]>
To: [email-masked]
Date: Tue, 14 Sep 2010 22:49:51 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

Fixed in emacs-23.

Subject: 23.2; [PATCH] appt ignores included diary files
From: Leo <[email-masked]>
To: [email-masked]
Date: Wed, 08 Sep 2010 13:31:42 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

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.

diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el
index 3573c95..818fee4 100644
--- a/lisp/calendar/appt.el
+++ b/lisp/calendar/appt.el
@@ -660,7 +660,8 @@ 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)))