Emacs on MacOS Catalina 10.15 in 2̶0̶1̶9̶ 2020

Enjoy the power of Emacs on those fruit-branded computers

Photo by me. Nothing to do with Catalina, Emacs, or Apple: it’s made by design, like they do.

I have always been an Emacs lover for the sake of simplicity. With MacOS Catalina update, it is a headache as usual to getting Emacs to work seamlessly with the terminal or iTerm2, or the Finder. One can be a GTD-nerd, a writer of any kind, or just working with plain text files, and loads of information; everyone deserves the right to use free software, even if Emacs is not embed with the last version of MacOS Catalina.

If you haven’t installed Emacs yet, I would recommend you to do it right now thru your favorite shell.

brew cask install emacs

I won’t demonstrate why Emacs is awesome. It goes without speaking. You can download it from emacsformacosx.com as well if you are more comfortable with GUI package installers.

Emacs can be invoked from the command line (emacs) and the Finder (/Applications/Emacs.app). Do not forget to fix its permissions in the panel System Preferences > Security and Privacy > Privacy or Emacs won’t be able to access your hard drive.

Enable ruby as well located in /usr/bin/ruby . After hitting the + button, press ⌘-⇧-G to open /usr/bin . Ruby is hiding in there.

For a nice user experience (aka UX) on MacOS, I can’t stress enough to install Castlemacs. It is lightweight. MacOS keybindings are nicely integrated with Emacs’. I can use the ⌘ key for Command and Super. All of my mac and emacs keybindings are working together like a charm. None is missing.

Note: On the first run, dired gives me an error ls does not support --dired; see `dired-use-ls-dired' for more details. Insert (setq dired-use-ls-dired nil) into your custom.el file.

The problem

Buggy behavior: Emacs starts a new instance (and process) every time I am trying to open a doc either from the command line or the Finder. I don’t really care about that… I am more cringing about the time it is taking to boot on my shiny 2017 Macbook Pro, like… 5 seconds? Way too long for me. Textmate opens instantly (Finder or CLI). So I have this piece of code from the 60’s which is Emacs, flavored with a lightweight layer on top, taking a $4K Macintosh laptop five long seconds at startup? I can’t live with it, can’t sleep with it. It is pinching a painful nerve of injustice: am I going to pour my money into subscription software to manage my tasks, my calendar, my projects, my journals, my bills, my reports… my life? Not today.

I want Emacs to boot in a blitz on MacOS Catalina so do I need a daemon? brew services start emacs is broken. emacs --daemon command does not seem to help. Google is my friend, like Stackoverflow, though I could not find any cure for my pain.

The solution

I am mainly using the CLI on iTerm2. I don’t really need an .app file to double click on, or to spotlight. I am blessed to have a smart son able to speak bash fluently. He wrote me a beautiful piece of shell that does the job, all credits to him. The poetry has been commented for you to understand the true meaning of it. We want to start a server, if it is not already started. Then open our document in a new buffer.