unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#6999: 23.2; [PATCH] appt ignores included diary files
@ 2010-09-08 12:31 Leo
  2010-09-08 12:45 ` Leo
  0 siblings, 1 reply; 10+ messages in thread
From: Leo @ 2010-09-08 12:31 UTC (permalink / raw)
  To: 6999

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





^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-09-15  2:49 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-08 12:31 bug#6999: 23.2; [PATCH] appt ignores included diary files Leo
2010-09-08 12:45 ` Leo
2010-09-08 14:38   ` Stefan Monnier
2010-09-08 15:07     ` Leo
2010-09-14  0:24   ` Glenn Morris
2010-09-14  6:19     ` Leo
2010-09-14  7:20       ` Glenn Morris
2010-09-14  7:38         ` Leo
2010-09-14  8:06           ` Glenn Morris
2010-09-15  2:49             ` Glenn Morris

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).