unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Leo <sdl.web@gmail.com>
To: 6999@debbugs.gnu.org
Subject: bug#6999: 23.2; [PATCH] appt ignores included diary files
Date: Wed, 08 Sep 2010 13:31:42 +0100	[thread overview]
Message-ID: <m17hiw1knl.fsf@cam.ac.uk> (raw)

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	other threads:[~2010-09-08 12:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-08 12:31 Leo [this message]
2010-09-08 12:45 ` bug#6999: 23.2; [PATCH] appt ignores included diary files 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m17hiw1knl.fsf@cam.ac.uk \
    --to=sdl.web@gmail.com \
    --cc=6999@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).