Konstantin Nazarov

Fully vendored Emacs configuration

Over the years I’ve rewritten my emacs configuration many times. Initially I started with a plain .emacs configuration file and copy-pasted stuff from blogs or wikis that I liked. It wasn’t synchronized between my home and work machines. It was also before GitHub came to life, and long before storing your dotfiles there became fashionable.

Then I stumbled upon Prelude and Spacemacs, both of which provide featureful “batteries included” configurations that are highly advanced. They fine-tune almost every conceivable aspect of Emacs to perfection. I jumped on the bandwagon because the initial experience was great.

It all lasted until I needed to tune the configuration to my own workflow, which is when things started to break down. I couldn’t maintain my own fork on top of Prelude, since it gets changed constantly. And the default way of layering stuff on top of Prelude is not powerful enough to change some settings. The same is basically true for Spacemacs.

Another issue that frustrated me was that the underlying third-party packages are constantly updated and the user experience subtly changed all the time.

So I figured out it was time for me to sit down and write my own configuration from scratch. I wanted it to be anti-mainstream and follow my own needs and not the community. There were a few design goals:

  • Keep configuration in one file, as simple as possible, without additional abstractions.
  • Vendor the hell out of third party modules (everything in one git repo, no external deps).
  • Do not update anything unless really necessary (Emacs is very stable, and core APIs change very rarely, so things written 10 years ago still work).

I know that many people consider vendoring a bad practice. But my belief is that it’s highly contextual. Yes, for many established platforms and languages you may rely on the public package repository to stay for a long time. But even then, funny things still happen and owners occasionally delete their repositories. In Emacs world it’s significantly worse: there is no way to install older versions of packages from the official repositories, and packages go obsolete all the time.

There are solutions to this problem, but they are either incomplete, experimental or create a level of complexity I couldn’t care less about. So instead, I went with the extremely simple but unorthodox approach. If you are struggling with maintaining your emacs dotfiles, give my approach a try.

Share this post

Share on facebook
Share on google
Share on twitter
Share on linkedin
Share on pinterest
Share on print
Share on email