1

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))
  • The function 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 function window-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 aka C-h f. – lawlist Mar 20 '19 at 20:45
  • There's no way to create windows that will be ordered in such way. If you want to cycle through them that way, you'll need to write a custom window movement command. – user12563 Mar 20 '19 at 21:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.