TLDR; a minimalist config file to make vanilla Emacs work as expected on macOS.
Times change. Needs change.
Like many, I’ve spent a lot of time adding tweaks to my Emacs config files to make sure that common tasks and actions are only one key stroke away, and that specific packages behave just so. I’ve spent hours making sure that my config is well documented and structured in something like an org file. This can lead to a sense of attachment with one’s configuration files (be it in Emacs or any other tool).
However, every now and then, I realise that I have way too much going on in my Emacs setup. This is largely due to me doing a bad job of removing packages that are no longer relevant to my current workflow.
Bloated config files generally lead to slow Emacs initialisation times. This can send me into an irrational frenzy where I believe the only sane thing to do is to start over by trashing my current configuration. I’ve found that the best thing to do in this situation is to breathe deeply, calm down, and then delete my configuration files.
Having all my config in a single file, whether it is in org-mode or Emacs Lisp format does not scale well, and creates friction with respect to future maintainability. The plan going forward is to split related package configurations into separate Emacs Lisp files that I can load independently with a single line of code each. But that is a blog post for another time. For now I just want vanilla Emacs.
I’ve found that there are a few rough edges with how vanilla Emacs (v26.1 at time of writing) behaves on macOS. This generally leads me to the same StackOverflow articles I looked at the last time I went through this kind of spring clean. What I need is just enough setup to make vanilla Emacs work as expected on macOS.
The minimalist setup
This is what I have so far.
;; ~/.emacs.d/init.el ;; A minimalist setup for Emacs on macOS ;; Basically just fixes stuff that is misconfigured by default ;; ui (tool-bar-mode -1) (scroll-bar-mode -1) ;; fix env vars on macOS (setenv "PATH" (concat (getenv "PATH") ":/usr/local/bin")) ;; often GPG decryption simply freaks out - this enforces the password prompt in the mini buffer (setq epa-pinentry-mode 'loopback)
As you can see, that’s not very much code. That’s kind of what I am going for.