Unlike some Emacs old-schoolers, I make heavy use of the Emacs built-in GUI-ish customization system. In order to make customizations in my new blank-slate setup, I need to first set it up to use a different file than the default. So the first additions I make to my init.el are to customize the customizations file.
First, I set up some variables recording the full path of the init.el file and the directory it lives in. That way I can refer to relative paths within my .emacs24.d directory without hardcoding any paths.
Note that I prefix all of my variables with “abg-” (my initials) in order to avoid stepping on existing variable names.
Once I have a reference to the current directory, I set up the custom file and then load it.
Here’s the code:[gist id=1204514 file=init.el]
Then to test it out, I load the file with M-x load-file and then open up a customize buffer for the tool-bar-mode toggle.
Once I toggle the toolbar mode to “off” and click “Save for future sessions” I can see the customizations have been saved to ~/.emacs24.d/emacs-customizations.el:[gist id=1204514 file=emacs-customizations.el]
This is a nice touch:
I’m revisiting my emacs config. I have all my customization stuff at the bottom of my ~/.emacs.d/init.el. Emacs does it by default. Having it in the different file is convenient. Thanks Avdi!