1

With the following code, emacs split sides windows like:

;; -------------------------------------
;; |                             |  *  |
;; |                             |  h  |
;; |                             |  e  |
;; |         Main Window Area    |  l  |
;; |                             |  p  |
;; |                             |  *  |
;; |                             |     |
;; |_____________________________|_____|
;; |        *shell*                    |
;; |                                   |
;; |___________________________________|

How to split like this below instead?

;; -------------------------------------
;; |                             |  *  |
;; |                             |  h  |
;; |                             |  e  |
;; |         Main Window Area    |  l  |
;; |                             |  p  |
;; |                             |  *  |
;; |                             |     |
;; |_____________________________|     |
;; |        *shell*              |     |
;; |                             |     |
;; |_____________________________|_____|

Display code:

   (setq display-buffer-alist nil)

   (add-to-list 'display-buffer-alist
                 ;; put help/info buffer in a side window;
                 ;; it must be on the right-hand side and in slot 0;
                 ;; the window-width must be 82;
                 ;; the window is not deleted when you call C-x 1.
                 '("^\\*\\(Help\\|helpful .*\\|Apropos\\)\\*"
                   (display-buffer-in-side-window)
                   (side . right)
                   (window-width . 82) ; width of 80 plus 2 for window edges.
                   (window-parameters . (no-delete-other-windows . t))))

    (add-to-list 'display-buffer-alist
                 '("^\\*\\(e?shell\\|compilation\\)\\*"
                   display-buffer-in-side-window
                   (side . bottom)
                   (window . root)
                   (window-height . 0.25)
                   (window-parameters . (no-delete-other-windows . t))))
RNA
  • 368
  • 2
  • 10

1 Answers1

0

C-hig (elisp)Side Window Options and Functions:

-- User Option: window-sides-vertical If non-‘nil’, the side windows on the left and right of a frame occupy the frame’s full height. Otherwise, the side windows on the top and bottom of the frame occupy the frame’s full width.

So:

(setq window-sides-vertical t)

Or if it doesn't need to be a "side window":

+               display-buffer-at-bottom
-               display-buffer-in-side-window
-               (side . bottom)
-               (window . root)
phils
  • 48,657
  • 3
  • 76
  • 115