From: Glenn Morris <rgm@gnu.org>
To: Stephen Berman <stephen.berman@gmx.net>
Cc: 8920@debbugs.gnu.org
Subject: bug#8920: 24.0.50; Calendar raises error with #included diary file
Date: Sat, 25 Jun 2011 18:25:18 -0400 [thread overview]
Message-ID: <ouiprty2ep.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <878vst8o5i.fsf@escher.fritz.box>
Stephen Berman wrote:
> *** /home/steve/bzr/emacs/trunk/lisp/calendar/calendar.el 2011-06-04 12:27:38.000000000 +0200
> --- /home/steve/bzr/emacs/quickfixes/lisp/calendar/calendar.el 2011-06-25 22:10:04.000000000 +0200
> ***************
> *** 1392,1398 ****
> (calendar-mark-holidays)
> (and in-calendar-window (sit-for 0)))
> (unwind-protect
> ! (if calendar-mark-diary-entries-flag (diary-mark-entries))
> (if today-visible
> (run-hooks 'calendar-today-visible-hook)
> (run-hooks 'calendar-today-invisible-hook)))))
> --- 1392,1401 ----
> (calendar-mark-holidays)
> (and in-calendar-window (sit-for 0)))
> (unwind-protect
> ! (if calendar-mark-diary-entries-flag
> ! (save-selected-window
> ! (save-excursion
> ! (diary-mark-entries))))
> (if today-visible
> (run-hooks 'calendar-today-visible-hook)
> (run-hooks 'calendar-today-invisible-hook)))))
I don't like this, because IIUC, this is only needed because of the:
(find-file-noselect (diary-check-diary-file) t)
in diary-mark-entries.
It should be implicit that find-file-noselect does not mess with the
window layout, and we should not need to wrap every call to it in save-*
constructs to guard against inappropriate find-file-hooks.
I've made some changes to diary-lib.el that mean there is no longer an
error in the initial example; however the calendar buffer ends up being
replaced with the diary buffer.
I didn't read in detail all that you want to do, but I think the only
way you can do it at present is by advising find-file rather than using
find-file-hook.
next prev parent reply other threads:[~2011-06-25 22:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-22 23:03 bug#8920: 24.0.50; Calendar raises error with #included diary file Stephen Berman
2011-06-24 18:49 ` Glenn Morris
2011-06-24 21:32 ` Stephen Berman
2011-06-25 20:18 ` Stephen Berman
2011-06-25 22:25 ` Glenn Morris [this message]
2011-06-26 0:19 ` Stephen Berman
2011-06-26 1:25 ` Glenn Morris
2011-06-26 11:09 ` Stephen Berman
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=ouiprty2ep.fsf@fencepost.gnu.org \
--to=rgm@gnu.org \
--cc=8920@debbugs.gnu.org \
--cc=stephen.berman@gmx.net \
/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).