Subject: Re: bug#18381: 24.3.93; Diary can wrongly be displayed in Calendar's window

From: Glenn Morris <[email-masked]>
Date: Thu, 04 Sep 2014 18:39:02 -0400

Glenn Morris wrote:

> Maybe "don't display the diary in the selected window" would suffice.
> Sounds like adding '(inhibit-same-window . t) to display-buffer's alist
> might do, but I cannot figure out how to do that.

Following works, but having to use `ignore' seems odd?

*** lisp/calendar/calendar.el	2014-03-17 16:04:32 +0000
--- lisp/calendar/calendar.el	2014-09-04 22:36:56 +0000
***************
*** 1432,1438 ****
        (calendar-generate-window month year)
        (if (and calendar-view-diary-initially-flag
                 (calendar-date-is-visible-p date))
!           (diary-view-entries))))
    (if calendar-view-holidays-initially-flag
        (let* ((diary-buffer (get-file-buffer diary-file))
               (diary-window (if diary-buffer (get-buffer-window diary-buffer)))
--- 1432,1440 ----
        (calendar-generate-window month year)
        (if (and calendar-view-diary-initially-flag
                 (calendar-date-is-visible-p date))
!           (let ((display-buffer-overriding-action
!                  '(ignore . ((inhibit-same-window . t)))))
!             (diary-view-entries)))))
    (if calendar-view-holidays-initially-flag
        (let* ((diary-buffer (get-file-buffer diary-file))
               (diary-window (if diary-buffer (get-buffer-window diary-buffer)))