3

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

skyork
  • 211
  • 2
  • 5

2 Answers2

5

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"

Documentation:
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

Sam
  • 317
  • 1
  • 11
nega
  • 3,091
  • 15
  • 21
  • If the Emacs is already installed after `brew edit emacs` run `brew reinstall -s emacs` rather than just `install`. – Navidot Dec 15 '20 at 20:09
1

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.

Ian
  • 1,321
  • 10
  • 12