Emacs Literate Config

Having some time this summer, I decided to try to convert my very disorganized Emacs config files into one Org-mode file. I have had a literate config in the past, and it went much more easily than I remember. If you're thinking about creating one, here is what I recommend.

First, use the same org file to generate both early-init.el and init.el. The file that a section tangles to is specified in the section's properties. My first top-level section heading is this:

* Early init file
:header-args: :tangle early-init.el

Anything in this section becomes part of early-init.el. All of the other top-level sections specify to tangle to init.el. Both files are created when the Org file is tangled. Lower-level sections inherit their properties from the top-levels. So, only the top-level sections need the properties specified.

I recommend beginning by adding just enough to set up package management and installing Org Auto Tangle, and then use C-c C-v t to tangle the file and generate both early-init.el and init.el. After that, Org Auto Tangle will automatically tangle the file every time that the Org file is saved.

My Emacs Config is on Github. View the raw file to see all of the properties and src blocks.