Stop Emacs from Writing package-selected-packages into init.el

A new minor annoyance in Emacs 25.1 is that Emacs maintains a variable called package-selected-packages that maintains a list of packages that you have specifically specified. This is used to handle dependencies on package deletion as well as making it possible to port your package configuration to multiple machines.

Here’s the problem: Emacs writes that variable into the custom section of your init.el (or .emacs). That means that configurations on different machines can diverge making syncing (say through Git) harder. Also, I don’t like anything in the configure section. I want everything my init.el does specified by me not by configure.

Happily, there are a bunch of solutions to this. One of the easiest—and what I’ve chosen to do—is to specify a separate file for the configure data. You can load this file or not but at least it stops Emacs from messing with your init.el. There are some other solutions as well, so be sure to follow the link.

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