2

I am trying to implement this window transition

a/             b/     
---------      -------------
| 1 | 2 |      |   | 1 | 2 |
---------  ->  | 0 |-------|
| 3 | 4 |      |   | 3 | 4 |
---------      -------------

More precisely, I'm trying to implement something similar to neotree, that opens in some sort of sidebar.

1

With display-buffer-in-side-window you get almost what you are asking for. The windows will not be numbered in the way you want them but the layout is exactly as you requested.

I demonstrate it in the following with the scratch buffer in window 0 of your window-layout:

(display-buffer "*scratch*" '(display-buffer-in-side-window (side . left)))

Note that you can switch between two window configuration with the help of current-window-configuration and set-window-configuration.

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.