Occasionally, we may still need emacs for small editing, but on Catalina or Big Sur, emacs is not available. There are some options: one is to use nano
or vi
instead. Another is to install emacs
using Homebrew. The third option which can be simple is just to use mg
. It is MicroGnuEmacs and when you use it, you can use the familiar keystrokes as in emacs.
If you are used to typing e
for emacs
and using emacs
for git
, simply change the zsh alias in ~/.zshrc
to
alias e='mg'
and config git
:
git config --global core.editor mg
Discussion
I'm pretty sure Catalina still had a version of emacs 22, but I just updated to BigSur so I can't check...
are you sure... I was googling for it and it showed installing emacs using Homebrew on Catalina...
No, you may be right, but since I upgraded to Catalina it was already there and the upgrade did not remove it. Plus I was mostly build in from source once in a while so I did not really pay attention.
yeah, looks like you installed emacs 22 before you had Catalina...
I think "Terminal" emacs 22 was installed by default all along. It was removed with Catalina.
oh ok, when I saw emacs 22 I thought the GUI one... so the text based version is version 22...
Yes, I think that's the one that came with GPL2. When it moved to GPL3, Apple stopped to upgrade it, or something like this.