- Opening Two Buffers on Startup
You could add a function to emacs-startup-hook
which switches to the first buffer you want, splits the window, moves to the next window, and switches the second buffer (this is exactly what the function below does). You didn't specify whether the buffers you wanted to display were file buffers or already existing buffers. Here they are created if they don't exist. If you want file buffers use find-file
instead of get-buffer-create
.
(defun my-setup-initial-window-setup ()
"Do what I want for initial window setup.
In my case I want to start with 2 windows split side by side."
(interactive)
(switch-to-buffer (get-buffer-create "one"))
(split-window-horizontally)
(other-window 1)
(switch-to-buffer (get-buffer-create "two")))
(add-hook 'emacs-startup-hook #'my-setup-initial-window-setup)
This is the easiest way. You'd just ignore initial-buffer-choice
. If you want to be very efficient you could make initial buffer choice a function returning to the first buffer you want to see on startup and then use a slightly modified version of the function above.
Your question on buffer width is a separate question. There are already detailed answers online on how to change window width.