Declarative, Reproducible Emacs

Jacob Boxerman has a nice video and related blog post about his approach to configuring Emacs in a declarative and reproducible way. By “reproducible” he means that if he installs his init.el on a new system, he gets the exact same Emacs environment. That doesn’t mean just things like colors and key bindings but also that the same versions of the same packages are loaded and available.

By “declarative” he means, essentially, that he uses use-package and straight.el to specify and configure his packages in a declarative way. The goal is that the order of the declarations doesn’t matter and if one declaration s deleted, no other package is affected.

The video is a tour through a sample configuration based on Boxerman’s that shows how he accomplishes these things. The declarative part is mostly handled by use-package while the reproducible part depends mostly on straight’s ability to lock a file to a specific version. Take a look at the video and associated blog post for the details.

If, like me, you don’t have multiple machines that you require to provide exactly the same Emacs environment, you can probably omit straight.el but the idea of putting all your configuration in use-package blocks is a good one. It goes a long way towards ensuring that changes in one area won’t affect things in another.

Boxerman describes an excellent way of keeping your Emacs configuration under control and avoiding problems when—inevitably—you have to make changes. The video is only 8 minutes, 23 seconds so it’s easy to find time for it. If you find his ideas useful, take a look at his post, which explores them in a bit more detail.

This entry was posted in General and tagged . Bookmark the permalink.