1

emacs 26.1

I split windows-horizontally by split-window-horizontally

enter image description here

Nice. Now I want to get smt like this:

enter image description here

I try split-window-vertically , but I get this (not correct result): enter image description here

  • 2
    Reverse the order: split vertically, then horizontally. – Dan Nov 24 '19 at 10:08
  • @Dan Yes, I know about this. But suppose I opened and split 5 windows. And if I want to get my result then I must close ALL windows and AGAIN open 5 windows in another order. It's not very good solution. – a_subscriber Nov 24 '19 at 10:33
  • 1
    you may be looking for something like edwina package. There are others which does more or less the same also. – Muihlinn Nov 25 '19 at 8:01
4

Emacs is doing what you are asking it to do, unfortunately.

https://www.emacswiki.org/emacs/TransposeFrame is a package which allows you to flip the contents of your frame along the horizontal or vertical axis, or to rotate your frame (which is what you are asking for).

I find this reasonably useful, so have bound it to a key:

(global-set-key [C-S-f6] 'rotate-frame-clockwise)
1

For splitting the root window, I am using the following function (from Add window to the right of two horizontally split windows):

(defun split-root-window (size direction)
"splits the root window (i.e., can be used to
 create a split below/beside splits.)
 size, if positive  is the size of the current root window
 after the split, and if negative the size of the new split"
(split-window (frame-root-window)
              (and size (prefix-numeric-value size))
              direction))

where direction is 'left, 'right, 'above or 'below and split-window is from windows.el

Auxilliary functions bound to keys:

(defun split-root-window-above (&optional size)
(interactive "P")
(split-root-window size 'above))

(defun split-root-window-below (&optional size)
(interactive "P")
(split-root-window size 'below))

etc..

Other solutions are found in the answers to the following question: Split Window at outermost border

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.