I believe, there are three ways to build emacs on osx --- x11, ns (nextstep?), and cocoa. Can anyone explain what the build options mean / the difference between these three are?
There are a number of Emacs versions for macOS, including:
The official Emacs on macOS is build using the "NS" port, also known as the "cocoa" port. As the name suggests, this port of Emacs originates in Emacs for the NextSTEP operating system and has been the official Emacs GUI on macOS since Emacs 23.
Mitsuharu Yamamoto-san maintains the "Mac port" of Emacs. It provides an alternative GUI with a different feature set compared to the NS port. This originates from the Emacs port to Mac OS 8/9 and the "Carbon" port of Emacs 22. (This port is also referred to as the "railway cat" Emacs, as this is where the
brewrecipe is hosted.)
Aquamacs is based on the NS port of Emacs and contains a number of enhancements making it behave more like traditional macOS applications.
X11: It is possible to build Emacs with the same GUI as used on X11 system, however it requires a X11 server to run. Unfortunately, the end result will not have macOS look and feel -- things like menus looks as though you were running on a unix-like system. In fact, this is not one GUI but a family of GUI:s as it's possible to build using different X11 support libraries like GTK+.
Terminal only. This gives you an Emacs that only can run in a terminal window, much like a GUI Emacs behaves when passed the
So, which should you pick?
If you are lazy, pick the official Emacs -- you can download a prebuilt version from https://emacsformacos.com.
If you want to spend some time on getting the best Emacs for you, try both the official Emacs and the "mac" port. Overall, they are fairly similar but provides a slightly different feature set.
Generally, I would not recommend using the X11 port as you wont get macOS look and feel, however in some situations it might be of interest:
- You want a feature only available in the X11 port, like support for
- You are accustomed to X11 and want the exact same look and feel when using Emacs on macOS
- You want a "reference" implementation of Emacs, e.g. when contributing to the NS port of Emacs.