I just got a Macbook (my first one!) and want to know how to configure Emacs to run in the same way it runs in Linux. That is, if I type "emacs foo.c &" in the Terminal, I want to either open either a new or existing file called foo.c in a separate Emacs window, NOT in the terminal.
Mac – How to open Emacs like in Linux Terminal
emacsterminal
Related Question
- MacOS – running emacs on a terminal: problem with meta-key
- Mac – How to open different emacs version from the shell
- MacOS – New Terminal behavior after upgrading to OS X 10.11
- MacOS – How to open a Terminal window directly from the current Terminal location
- Sending text to an open terminal window with automator
- Mac – “open” command starts separate Emacs.app processes, or none at all
Best Answer
If the emacs you are running in Linux creates a new window then you are running it as an X11 application (a GUI application). Normally emacs on Linux and other systems just runs in the terminal you have open (as a console application).
The version of emacs that ships with OS X is compiled just to run in a terminal. To replicate running in a new window you need another version of emacs. I would use Aquamacs which is an emacs modified to act like a normal OSX Cocoa app. The standard GNU emacs has a Cocoa app version which defaults to be more similar to behaviour on other platforms and is available in a binary version here.
You can also get X11 versions as well. Here is an exhaustive list of the available types of emacs for OS X.