Skip to content

Instantly share code, notes, and snippets.

@farrokhi
Last active September 14, 2022 09:29
Show Gist options
  • Save farrokhi/27050ec32f821ebf530f04b98a54b89d to your computer and use it in GitHub Desktop.
Save farrokhi/27050ec32f821ebf530f04b98a54b89d to your computer and use it in GitHub Desktop.
emacs installation on MacOS

Install emacs view brew:

brew tap railwaycat/emacsmacport
brew install --with-native-comp --with-imagemagick --with-natural-title-bar --with-starter emacs-mac

Install latest mu (including mu4e):

brew install --HEAD mu

In case HEAD on mu is broken (happens often), try a stable point in timeline. This is a bit messy, but worth it:

export MUCOMMIT="1a84a57e"

# brew prefix is different per architecture
[ `uname -m` = "arm64" ] && export HBPREFIX="/opt/homebrew" || export HBPREFIX="/usr/local"

# dependencies
brew install libgpg-error libtool pkg-config gettext glib gmime xapian autoconf autoconf-archive automake meson ninja

# checkout
git checkout ${MUCOMMIT}
git clean -dfx

# build
rm -fr build/
meson build/ -Dprefix=${HBPREFIX}/Cellar/mu/HEAD-${MUCOMMIT} -Ddatadir=${HBPREFIX}/Cellar/mu/HEAD-${MUCOMMIT}/share/emacs/site-lisp/mu -Dguile=disabled
ninja -C build

# install
ninja -C build/ install
ln -vFfs ${HBPREFIX}/Cellar/mu/HEAD-${MUCOMMIT}/bin/mu ${HBPREFIX}/bin/mu
ln -vFfs ${HBPREFIX}/Cellar/mu/HEAD-${MUCOMMIT}/share/emacs/site-lisp/mu ${HBPREFIX}/share/emacs/site-lisp/mu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment