How to run a Emacs server on the Mac OS.


To make the startup time for Emacs shorter.


To start emacs daemon

brew install emacs --with-cocoa --with-gnutls --with-imagemagick --with-dbus --with-librsvg --with-mailutils

After installation, start the process in the background with the following:

/usr/local/bin/emacs --daemon

This will load any Lisp code and have it ready for use when the client connects. To connect a client, run the following:

emacsclient -c

This should connect to the Emacs server running in the background and take less time to launch.

To stop emacs daemon

Below are two ways to kill the Emacs daemon which should end the process in a graceful mannor.

Kill without saving

emacsclient -e "(kill-emacs)"

Kill with saving buffers

emacsclient -e '(client-save-kill-emacs)'
comments powered by Disqus