Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
One window or one instance (one running Emacs application)? – patrix Jul 20 '14 at 19:50
One window, multiple buffers. – qed Jul 20 '14 at 19:54
up vote 2 down vote accepted

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


in your emacs init file.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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