When I invoke Emacs from the shell with the command emacs fileA fileB, I'd like to have the Emacs window split vertically (i.e. with one file on the left and one file on the right), not horizontally, to show the two buffers. How should I edit my .emacs configuration file?

1 Answer 1


If you don't care which file goes on the right and which file goes on the left, try the following init file:

(setq inhibit-splash-screen t)

And yes: split-window-horizontally splits it vertically in your terminology :-) Emacs's terminology is different from yours.

  • It works. But now there's a minor annoyance - when I open just one file, with emacs fileA from the terminal, the screen is still split into two parts, with one part showing *scratch*. Is there a quick workaround?
    – felix
    Commented May 26, 2021 at 20:04
  • I don't think so - in any case, I don't know one and a little investigation was fruitless. You might want to post it as a new question: that might attract some new eyes to it.
    – NickD
    Commented May 26, 2021 at 23:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.