From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Leo Newsgroups: gmane.emacs.bugs Subject: bug#6999: 23.2; [PATCH] appt ignores included diary files Date: Wed, 08 Sep 2010 13:45:46 +0100 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1283951422 25157 80.91.229.12 (8 Sep 2010 13:10:22 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 8 Sep 2010 13:10:22 +0000 (UTC) To: 6999@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Sep 08 15:10:21 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OtKPq-0003Q3-Hj for geb-bug-gnu-emacs@m.gmane.org; Wed, 08 Sep 2010 15:10:19 +0200 Original-Received: from localhost ([127.0.0.1]:51168 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OtKPp-0003w5-UY for geb-bug-gnu-emacs@m.gmane.org; Wed, 08 Sep 2010 09:10:17 -0400 Original-Received: from [140.186.70.92] (port=57881 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OtKPj-0003w0-7Q for bug-gnu-emacs@gnu.org; Wed, 08 Sep 2010 09:10:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OtKPh-0001u7-SL for bug-gnu-emacs@gnu.org; Wed, 08 Sep 2010 09:10:11 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45511) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OtKPh-0001u0-R2 for bug-gnu-emacs@gnu.org; Wed, 08 Sep 2010 09:10:09 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OtK0Q-0002Ll-MK; Wed, 08 Sep 2010 08:44:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Leo Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 08 Sep 2010 12:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6999 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 6999-submit@debbugs.gnu.org id=B6999.12839498329025 (code B ref 6999); Wed, 08 Sep 2010 12:44:02 +0000 Original-Received: (at 6999) by debbugs.gnu.org; 8 Sep 2010 12:43:52 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OtK0F-0002LW-Td for submit@debbugs.gnu.org; Wed, 08 Sep 2010 08:43:52 -0400 Original-Received: from ppsw-30.csi.cam.ac.uk ([131.111.8.130]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OtK0D-0002LQ-Fr for 6999@debbugs.gnu.org; Wed, 08 Sep 2010 08:43:50 -0400 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: not scanned X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Original-Received: from cpc1-cmbg13-0-0-cust596.5-4.cable.virginmedia.com ([86.9.122.85]:50896 helo=Victoria.local) by ppsw-30.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.156]:587) with esmtpsa (PLAIN:sl392) (TLSv1:DHE-RSA-AES128-SHA:128) id 1OtK27-0000BV-f5 (Exim 4.72) for 6999@debbugs.gnu.org (return-path ); Wed, 08 Sep 2010 13:45:47 +0100 In-Reply-To: (Leo's message of "Wed, 08 Sep 2010 13:31:42 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (Mac OS X 10.6.4) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Wed, 08 Sep 2010 08:44:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:40038 Archived-At: 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