Someone (in another SE answer) mentioned a feature thats only available in 26, so I guess now I gotta upgrade.
How do you install emacs 26 on macOS Sierra?
What I tried:
Googled how install emacs 26 Mac
,
brew install emacs
.
Someone (in another SE answer) mentioned a feature thats only available in 26, so I guess now I gotta upgrade.
How do you install emacs 26 on macOS Sierra?
What I tried:
Googled how install emacs 26 Mac
,
brew install emacs
.
Have a look at brew emacs recipe options with brew info emacs
. It has this option:
--devel
Install development version 26.0.90
To replace your current emacs, run:
brew unlink emacs
brew uninstall emacs
brew install emacs --devel --with-modules --with-cocoa --with-gnutls \
--with-librsvg --with-mailutils --with-imagemagick@6
brew linkapps
The imagemagick@6 library and emacs devel change frequently so exclude them from automatic updates and do updates manually at convenient times:
brew pin imagemagick@6 emacs
A current (at time of this comment) way to install the GUI version of Emacs (26.2 at this time) on macOS Mojave is with
brew cask install emacs
This will install Emacs.app package in to /Applications
and setup links. You can launch Emacs via Spotlight or from terminal as expected.
Unfortunately brew linkapps
is now deprecated.
You can use
EDIT: As Guilherme Salomé pointed out, now brew cask install emacs
but it doesn't allow you to download emacs 26 as of 4/1/2018.brew cask install emacs
will install version 26.1
.
You can though download the build you want from https://emacsformacosx.com/builds.
This only installs the terminal version of Emacs 26.1. If you (like me) prefer to use the GUI version of Emacs then you can't install it with
brew install emacs
This is because the people who maintain brew have found it cumbersome to maintain and test all the versions and custom options of multiple formulas. They have since then dropped support for custom options and encourage users to maintain their own taps. As others have mentioned you can use the emacs-mac version or you can also use the emacs-plus version but if you prefer to use the unedited version and with custom flags to support color-fonts, ImageMagick support and all, I suggest you use the version using the following tap homebrew-emacs-head.
brew tap daviderestivo/emacs-head
brew install emacs-head --with-cocoa
brew tap daviderestivo/emacs-head
brew install emacs-head --HEAD --with-cocoa
brew tap daviderestivo/emacs-head
brew install emacs-head --with-cocoa
brew install emacs-head@26
ln -s /usr/local/opt/emacs-head@26/Emacs.app /Applications
sudo ln -s /usr/local/opt/emacs-head@26/Emacs.app/Contents/MacOS/Emacs \
/usr/local/bin/emacs # This might be useful if you define `emacs` as your editor in .gitconfig file
alias emacs="/Applications/Emacs.app/Contents/MacOS/Emacs -nw"
MacOs has its own Emacs. In 2019 it's still 22.x. To use the last Emacs version do
brew cask install emacs
- it will install the latest emacs version to /Applications
folder.Then edit (or create if you still don't have) your ~/.bash_profile
file adding a new line
alias emacs='/Applications/Emacs.app/Contents/MacOS/Emacs -nw'
.
source ./bash_profile
to update bash environment.emacs -version
to ensure that you use the latest Emacs version.This will let you use Emacs terminal version. If you want to use Emacs UI, just remove -nw
in the step 2
.
Today on Big Sur brew install emacs
wasn't working for me.
brew install homebrew/cask/emacs
did the trick though.
If you want to stick with Emacs version 26 install it from the source:
export LDFLAGS="-L/usr/local/opt/libxml2/lib"
export CPPFLAGS="-I/usr/local/opt/libxml2/include"
export PKG_CONFIG_PATH="/usr/local/opt/libxml2/lib/pkgconfig"
TAG="26"
git clone --depth 1 --branch emacs-${TAG} git://git.savannah.gnu.org/emacs.git
cd emacs
make clean
./autogen.sh
./configure --without-compress-install --with-json --with-dbus --with-librsvg --with-imagemagick --with-mailutils