From: Stephen Berman <stephen.berman@gmx.net>
To: 18381@debbugs.gnu.org
Subject: bug#18381: 24.3.93; Diary can wrongly be displayed in Calendar's window
Date: Mon, 01 Sep 2014 16:59:26 +0200 [thread overview]
Message-ID: <87k35nqtdd.fsf@rosalinde.fritz.box> (raw)
0. emacs -Q
1. Type `M-x calendar' and then `i d' to create a diary file with an
entry for today.
2. M-x customize-option RET calendar-view-diary-initially-flag RET,
toggle the value to `On' and save for current session.
3. M-x diary => The diary entry made in step 1 is displayed (in the
Fancy Diary) in the lower window (which is not the selected window).
4. M-x calendar => The lower window resizes to fit the Calendar, which
is fleetingly displayed in it but then replaced by the Fancy Diary
display (in the same resized window).
The same problem happens if the simple diary display is used (e.g. by
customizing diary-display-function).
A real (i.e. my) use case which exposes this problem is to add
`(appt-activate 1)' to your init-file (cf. the commentary in appt.el) so
you see e.g. today's diary entries as in step 3 on starting Emacs, and
then you open the Calendar as in step 4.
The patch below fixes the problem for me, for both types of diary
display, though I haven't yet checked whether the change to
calendar-in-read-only-buffer adversely affects the other users of this
macro, since those are functions I don't use.
This problem does not happen in 24.3 (at least not in the one packaged
with openSUSE 13.1, for which I don't have the Lisp sources at hand), so
the fix should be committed to emacs-24.
In GNU Emacs 24.3.93.7 (x86_64-suse-linux-gnu, GTK+ Version 3.10.4)
of 2014-08-31 on rosalinde
Repository revision: 117464 rgm@gnu.org-20140828191824-o5hn2x503w527yhn
Windowing system distributor `The X.Org Foundation', version 11.0.11403901
System Description: openSUSE 13.1 (Bottle) (x86_64)
Configured using:
`configure --without-toolkit-scroll-bars 'CFLAGS=-g3 -O0''
=== modified file 'lisp/calendar/calendar.el'
*** lisp/calendar/calendar.el 2014-03-17 16:04:32 +0000
--- lisp/calendar/calendar.el 2014-09-01 13:02:00 +0000
***************
*** 1208,1214 ****
(goto-char (point-min))
(set-buffer-modified-p nil)
(setq buffer-read-only t)
! (display-buffer ,buffer)))
;; The following are in-line for speed; they can be called thousands of times
;; when looking up holidays or processing the diary. Here, for example, are
--- 1208,1214 ----
(goto-char (point-min))
(set-buffer-modified-p nil)
(setq buffer-read-only t)
! (display-buffer ,buffer t)))
;; The following are in-line for speed; they can be called thousands of times
;; when looking up holidays or processing the diary. Here, for example, are
=== modified file 'lisp/calendar/diary-lib.el'
*** lisp/calendar/diary-lib.el 2014-01-01 07:43:34 +0000
--- lisp/calendar/diary-lib.el 2014-09-01 12:28:23 +0000
***************
*** 1023,1029 ****
(calendar-set-mode-line (format "Diary for %s" (cdr empty))))
(unless (car empty) ; no entries
(with-current-buffer dbuff
! (let ((window (display-buffer (current-buffer))))
;; d-s-p is passed from diary-list-entries.
(set-window-point window diary-saved-point)
(set-window-start window (point-min)))))))
--- 1023,1029 ----
(calendar-set-mode-line (format "Diary for %s" (cdr empty))))
(unless (car empty) ; no entries
(with-current-buffer dbuff
! (let ((window (display-buffer (current-buffer) t)))
;; d-s-p is passed from diary-list-entries.
(set-window-point window diary-saved-point)
(set-window-start window (point-min)))))))
next reply other threads:[~2014-09-01 14:59 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-01 14:59 Stephen Berman [this message]
2014-09-01 17:37 ` bug#18381: 24.3.93; Diary can wrongly be displayed in Calendar's window Glenn Morris
2014-09-01 18:38 ` Stephen Berman
2014-09-04 0:34 ` Glenn Morris
2014-09-04 12:27 ` martin rudalics
2014-09-04 18:04 ` Glenn Morris
2014-09-04 19:48 ` Glenn Morris
2014-09-04 22:39 ` Glenn Morris
2014-09-04 23:40 ` Glenn Morris
2014-09-05 10:46 ` martin rudalics
2014-09-05 16:14 ` Glenn Morris
2014-09-06 8:52 ` martin rudalics
2014-09-08 6:04 ` Glenn Morris
2014-09-08 20:32 ` Stephen Berman
2014-09-09 1:26 ` Glenn Morris
2014-09-09 6:58 ` martin rudalics
2014-09-09 7:44 ` Glenn Morris
2014-09-09 9:18 ` martin rudalics
2014-09-09 18:13 ` Glenn Morris
2014-09-09 13:00 ` Stefan Monnier
2014-09-05 10:46 ` martin rudalics
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k35nqtdd.fsf@rosalinde.fritz.box \
--to=stephen.berman@gmx.net \
--cc=18381@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.