DEV Community

Kenneth Lum
Kenneth Lum

Posted on • Updated on

If you need emacs on macOS Catalina or Big Sur

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.

Note it is already pre-installed on Catalina and Big Sur. There is no need to install it.

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'
Enter fullscreen mode Exit fullscreen mode

and config git:

git config --global core.editor mg
Enter fullscreen mode Exit fullscreen mode

Top comments (6)

Collapse
 
mgrygles profile image
Mary Grygleski • Edited

I am actually running into an error on Big Sur that says ".... Apple cannot check it for malicious software....". Does anyone know how to work around this? (I got mine from emacsformacosx.com)

Collapse
 
kennethlum profile image
Kenneth Lum

I think mg is already built in, as in, already installed on Big Sur

Collapse
 
stanley12qs profile image
stanley12qs • Edited

Kenneth, yep, you're probably right about it. But there are dozens of situations can happen, when you simply have to go back and downgrade your MacOS to the previous version, and that's an only thing that can be helpful for you. I've recently could find one useful website called Setapp, and an article about such downgrading from Big Sur OS to Catalina. You can find more info here and make a bookmark in your browser, so that, when you will face some serious problems on MacOS, and there would be a need to make such downgrade - it will definitely help in that situation.

 
kennethlum profile image
Kenneth Lum

oh ok, when I saw emacs 22 I thought the GUI one... so the text based version is version 22...

 
kennethlum profile image
Kenneth Lum • Edited

yeah, looks like you installed emacs 22 before you had Catalina...

Collapse
 
kennethlum profile image
Kenneth Lum

are you sure... I was googling for it and it showed installing emacs using Homebrew on Catalina...