[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to force display-buffer-in-side-window to open side window on right?
From: |
Jean Louis |
Subject: |
How to force display-buffer-in-side-window to open side window on right? |
Date: |
Thu, 02 Feb 2023 08:46:09 +0300 |
I am trying to make function to provide 2 buffers in 2 windows, side
by side.
(defun rcd-two-windows (buffer-left buffer-right &optional window-register)
"Display BUFFER-LEFT and BUFFER-RIGHT only.
Previous window configuration is saved register ?r or to optional
WINDOW-REGISTER.
Parent function may restore window configuration by using the
function `jump-to-register' with WINDOW-REGISTER as argument."
(cond ((and (buffer-live-p buffer-left) (buffer-live-p buffer-right))
(let ((register (or window-register ?r)))
(window-configuration-to-register register)
(switch-to-buffer buffer-left)
(delete-other-windows)
(display-buffer-in-side-window buffer-right '(side right))))
(t (user-error "Buffers `%s' and `%s' must be live" buffer-left
buffer-right))))
However, with `emacs -Q' this below gives me window and smaller window
down on the bottom instead on right side
(let ((buffer-left (get-buffer-create "*My Left*"))
(buffer-right (get-buffer-create "*My Right*")))
(rcd-two-windows buffer-left buffer-right))
What am I doing wrong?
--
Jean
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
In support of Richard M. Stallman
https://stallmansupport.org/
- How to force display-buffer-in-side-window to open side window on right?,
Jean Louis <=