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

From: Glenn Morris <[email-masked]>
Date: Fri, 05 Sep 2014 12:14:12 -0400

martin rudalics wrote:

>> !           (let ((display-buffer-overriding-action
>> !                  '(ignore . ((inhibit-same-window . t)))))
>> !             (diary-view-entries)))))
>
> Stephen's original proposal would be cleaner provided we are sure that
> the calendar window is always selected when `display-buffer' is called.

I disagree, the above seems cleaner to me. I don't like changing a
general-purpose function to fix a specific problem.

Why do you say "`display-buffer-overriding-action' is too drastic"?
It seems fine to me. Since coming up with that form, I've noticed that
isearch.el and lisp.el use something similar (or identical).

I'm inclined to commit this solution...

> Is `calendar-in-read-only-buffer' presumably only executed in a state
> where the calendar window is shown and selected?

I don't think so, no.