1

I can open a file in emacs with this command:

open -a Emacs main.cpp

But when I apply the same command to multiple files

open -a Emacs main.cpp test.cpp

two emacs windows will appear. I would like to open them in the same emacs window, is this possible?

2
  • One window or one instance (one running Emacs application)?
    – nohillside
    Commented Jul 20, 2014 at 19:50
  • One window, multiple buffers.
    – qed
    Commented Jul 20, 2014 at 19:54

1 Answer 1

2

Instead of starting Emacs with open you can use emacsclient to send files to an already running Emacs. For this to work you need to start the corresponding server inside emacs by including

(server-start)

in your emacs init file.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .