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?
Best Answer
Instead of starting Emacs with
open
you can useemacsclient
to send files to an already running Emacs. For this to work you need to start the corresponding server inside emacs by includingin your emacs init file.