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

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

bug#6999: 23.2; [PATCH] appt ignores included diary files


From: Leo
Subject: bug#6999: 23.2; [PATCH] appt ignores included diary files
Date: Wed, 08 Sep 2010 13:31:42 +0100

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





reply via email to

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