6

Suppose my Emacs frame looks like this:

.-------------.
|a     |b     |
|      |      |
|      |      |
|      |------|
|      |c     |
|      |      |
|      |      |
'-------------'

Is is possible now to open another window below all other windows to get the frame that looks like the one below?

.-------------.
|a     |b     |
|      |      |
|      |------|
|      |c     |
|      |      |
|-------------|
|d            |
'-------------'
0
6

Yes, it is.

(split-window (frame-root-window) (truncate (* (window-total-height (frame-root-window)) 0.75)) 'below)

The crucial part is (frame-root-window) which returns a window spanning the whole frame.

3
  • TIL frame-root-window - thanks! – NickD Sep 2 '20 at 19:15
  • 1
    Maybe window-total-height should be called with a WINDOW argument (probably the root window): as it stands, the size is dependent on the currently selected window. – NickD Sep 2 '20 at 19:26
  • Good call, fixed. – wasamasa Sep 3 '20 at 9:02

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.