When opening emacs with two files $ emacs a.txt b.txt
, the window splits vertically.
I need to have a horizontal split instead. Is there a variable that controls this behavior or is there a hook where I can override the one behavior without changing other behaviors as well?
I've looked at related questions on StackOverflow but they had a different focus and their answers weren't directly applicable:
OP wants to delete the other windows when opening files: How do I prevent emacs from horizontally splitting the screen when opening multiple files?
OP wants to globally affect all functions that split windows and the answer involves tricking the split algorithm into thinking there is not enough space fo a vertical split: Setting Emacs Split to Horizontal and the same applies for: Open new Emacs buffer using vertical splitting
I would like to find the specific code runs when emacs is opened and change just the one call to (split-window-vertically)
.
In case it matters, I'm using GNU Emacs 24.3.1.