7

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

1 Answer 1

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, 2020 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, 2020 at 19:26
  • Good call, fixed.
    – wasamasa
    Sep 3, 2020 at 9:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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