I'd like to create a window layout like so:
-----------|--------------
a | b
-----------|--------------
d | c
-----------|--------------
This is so that I can cycle from a -> b -> c -> d (clockwise). The following doesn't quite work.. the cycling order is a -> d -> b -> c
(progn
(delete-other-windows)
(split-window-right)
(other-window 1)
(split-window-below)
(other-window -1)
(split-window nil nil 'above))
window-in-direction
can be used to see if there is something 'above, 'below, 'left, 'right. E.g,(if (window-in-direction 'above) (select-window ....))
, and(cond ((window-in-direction 'above) ...) ...)
. The functionwindow-in-direction
returns the window it finds, or nil if none. See the doc-string for more information regarding optional arguments, etc.M-x describe-function
akaC-h f
.