Is there a built-in function to return a window in a particular corner of a frame (e.g., lower-left, upper-left, upper-right, lower-right).
The following is a first draft to locate the lower-left corner, which returns a list (for debugging purposes) containing the desired window.
(let ((win-list (window-list))
ret)
(mapc
(lambda (win)
(when (and (window-live-p win)
(with-selected-window win
(and
(null (window-in-direction 'left))
(null (window-in-direction 'below)))))
(push win ret)))
win-list)
ret)
+-------------+--------------+
| | YOU ARE |
| | HERE "X" |
| | |
+-------------+--------------+
| GET THIS | |
| WINDOW | |
| | |
+-------------+--------------+
window-at-x-y
but it needs coordinates in pixels. There is alsowindow-at-side-list
so you could do(intersection (window-at-side-list nil 'left) (window-at-side-list nil 'bottom))
.