I am new to Emacs and I am running it on macOS. I use the GUI app, but I frequently want to launch it from the command line. With VS Code, if I ran code {filename} it would launch VS Code (or use the existing copy running) and open the file I want to edit. It would then exit the code command so I could continue to use the terminal.

If I run emacs {filename}, a new instance of the Emacs GUI is launched (even if there is an existing instance) and the command does not exit until I quit the GUI instance that is spawned. That isn't the largest problem - I can always open a new tab, but I would prefer it to not do so. I would also like it if the file I opened was added as a buffer to the existing instance of the GUI if one is already open.

Is this possible to do? I tried to do some searching on my own first, but I'm not even sure what terms to use for the searches and I (obviously) not been successful so far.

Thanks for any help :)

submitted by /u/BarbarianGeek
[link] [comments]