Installing Emacs on MacOS 12.0.1.
In general, I try to avoid installing things. Package managers help the situation a little, but the problem is that installing software, at its core, is terrible. The expected way to install things involves making thousands of mutations to a system, and relies on thousands more assumptions about what the system was before you started and what it will be after installation finishes.
This core idea is based on the procedural programming mindset: if you want something to exist, make many changes which accumulate to eventually make the thing exist. Conceptually, this is analogous to if you want there to exist 12 apples inside your refrigerator, there are many different ways to turn your desire into reality:
- add apples, one at a time, until there are 12, then stop
- add 12 apples all at once
- add 12 apples and 4 oranges, then remove the oranges
- add 3 apples and 1 orange until there are at least 4 oranges, and too bad if you didn’t want oranges
When you want to install some target software, the above approaches are all used at various places in your target’s dependencies. This is - clearly - a totally crazy and wrong way to get things done. There have been attempts to tame it, such as Nix, but because it’s less widely used, troubleshooting requires more specialized knowledge, which I don’t (yet) have time to acquire.
Maybe someday, Nix or some other Good SolutionTM will become mainstream, but for now, we just roll up our sleeves and install software by trudging through the snowy wasteland, uphill both ways, as previous generations have always done.
The first method I tried was to install emacs via Anaconda - this worked and was fast, but broke Anaconda. If you don’t need or want Anaconda for anything, this could be a good approach.
conda install -c conda-forge emacs
But I actually do want to use Anaconda for things besides just Emacs.
So I fell back to the tried-and-true Homebrew method.
brew install options are described here, and compilation takes a long time, so be patient.
brew tap d12frosted/emacs-plus brew install [email protected]28 --with-imagemagick --with-modern-cg433n-icon --with-native-comp --with-ctags
Finally, I like MacOS’s Spotlight to be able to find Emacs.
The easiest way to make this happen is to copy the .app folder to
cp -r /opt/homebrew/Cellar/[email protected]/28.0.50/Emacs.app /Applications