Q: how can I control which window org-deadline
uses to display the calendar?
org-deadline
temporarily pops up the calendar
buffer in a window when setting a deadline, and then closes it again after completing. When there is only one window, it pops a new window at the bottom of the existing frame. When there are multiple windows, it selects one -- I presume with something like get-lru-window
-- of the available windows.
The latter is problematic if it takes over one of the other windows that has the information I need in order to set the deadline (date, time, etc.) This is commonly a problem in a window setup such as:
+--------------------+--------------------+
| | |
| | (B: mu4e header) |
| | |
| +--------------------+
| (A: agenda file) | |
| | |
| | |
| | (C: mu4e view) |
| | |
| | |
| | |
+--------------------+--------------------+
When adding a deadline to the agenda file in (A), org-deadline
will take over (B) or (C), which contain emails that have the date/time information I need. I'd much prefer that, if I'm calling org-deadline
from (A), it would pop a temporary window (D) to contain the calendar
buffer as below:
+--------------------+--------------------+
| | |
| | (B: mu4e header) |
| | |
| +--------------------+
| (A: agenda file) | |
| | |
| | |
+--------------------+ (C: mu4e view) |
| | |
| (D: calendar) | |
| | |
+--------------------+--------------------+
So: how would one force org-deadline
(and analogous functions) to pop a new, temporary window at the bottom of the active window rather than take over one of the other ones?
PS: I'm aware of dedicated windows, but they don't strike me as the best approach since it's not so much that I want to dedicate buffers to windows as I want to avoid having a function take over one of the "short" ones.
display-buffer-alist
?) But I think there's an additional wrinkle here becauseorg-deadline
usescalendar
which itself goes way out of its way to control what window to use. c.f. the comments incalendar-basic-setup
.