It seems homebrew has removed all the options (incl. --with-cocoa) for brew install emacs. Now it recommends to use brew cask install emacs to get a built binary from https://emacsformacosx.com/. However, it is not clear to me which options are used to build the binary. The ones I care about are:

--with-modules --with-cocoa --with-gnutls --with-librsvg

Is there still a way to use homebrew to build the latest emacs but with the options above? If not possible, then how do we build emacs from source on OS X (10.12+) with those options

2 Answers 2


Any Emacs can show you how it was configured at build-time. Inspect the value of system-configuration-options with Control+h v. A recent Emacs from https://emacsformacosx.com/ shows:

system-configuration-options is a variable defined in ‘C source code’.
Its value is
"--with-ns '--enable-locallisppath=/Library/Application Support/Emacs/${version}/site-lisp:/Library/Application Support/Emacs/site-lisp' --with-modules"

String containing the configuration options Emacs was built with.

If that doesn't satisfy you, you can either do:

$ brew edit emacs
# make the changes you want
$ brew install -s emacs

or install emacs from its source at https://ftp.gnu.org/gnu/emacs/emacs-26.1.tar.gz

  • If the Emacs is already installed after brew edit emacs run brew reinstall -s emacs rather than just install.
    – Navidot
    Commented Dec 15, 2020 at 20:09

You may install emacs-plus from this:

From that link:

Note that by default emacs-plus builds the Cocoa version of Emacs with gnutls, imagemagick, librsvg and dynamic modules support by default.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.