I don't organize my emacs config file

Well, I organize it a tiny bit.

My actual init.el is small. All it does is

1. Start the emacs server

2. Set the custom-file and load it

3. Load the file containing package initialization configuration

4. Load another file called configuration.el

My configuration.el is 617 lines and mostly not organized.

How I got here

I've gone through phases of .emacs.d organization... for a long time, I had an org-mode literate config file with extensive documentation. Eventually I realized that I wasn't doing anything at all with the prose in the org-mode file that I couldn't literally dump into a code comment, but I had to type much more characters each time I wanted to add to it, so I tangled the file and dumped it.

Then I started to get annoyed at how long it took to reboot the server after initialization, so I started to split the file up into units that would be separately byte-compiled. (This was before nativecomp was a thing.) That lasted years, but what files existed and where new code went was always somewhat arbitrary, and then nativecomp dropped and the performance characteristics of byte-compiling different files mattered much less.

So then I just cat'd all my files together, replaced my pattern matching file loading with a simple load, and I've been there ever since.

How my system works now

When I add new configuration, I just scroll to the bottom of configuration.el and add it there, with a comment.

I never try to group similar code in similar parts of the file anymore.

If I'm editing existing code of course I'll do that in-place.

Benefits of this system

The barrier to adding new code is now basically zero. I have an interactive function that opens the config file; if I want to add something, I just do it, and it's done :)

Metadata

I manage my .emacs.d using git. I've gone back and forth on committing melpa packages; it was convenient once, but really dirties the git state.

Forking

I keep a git repo per device. When I provision a new device, I pull the most recently updated repo, push a new upstream to SourceHut, and make changes from there.


Source