Converting my .emacs to org-babel

Recently a coworker pointed me to this blog post which shows how to use org-babel to organize your .emacs file into an org-mode document. I've made this change and I love it. I had for a long time been meaning to organize my huge, mostly monolithic emacs initialization file into more managable chunks. This let me keep my large monolithic config while still letting me organize it into better chunks.

Now my ~/.emacs/init.el consists of only these lines:

    (require 'package)
    (add-to-list 'package-archives '("melpa" . "") t)
    (add-to-list 'package-archives '("org" . "") t)
    (require 'ob-tangle)
    (org-babel-load-file "~/.emacs.d/")

and the rest of my configuration gets organized into the file. That file can now be organized using org mode, and contain marked code sections which are exported by orb babel into a Stew.el file, which is then loaded as part of initialization. Here's an example section of my

    * widgets
    ** ace jump
    fast cursor movement. see the demo:
    #+begin_src emacs-lisp
       "Emacs quick move minor mode"
    (eval-after-load "ace-jump-mode"
    (define-key global-map (kbd "C-x SPC") 'ace-jump-mode-pop-mark)

And now2 that my .emacs file is organized in org-mode, I can export it as a decent looking .html file or PDF. You can view an htmlized version of my .emacs file here..

There are clearly some improvements I should be making to this file. I could be adding more comments. I could be making better use of org-mode (always, everyone always could be). One particularly interesting thing I see in Sacha's .emacs file is that she is using the :drill tag which should let her use Org-Drill to treat these entries as flashcards. This to me seems great, there are neat little tricks I find, drop in my .emacs file and forget about them. This would be a way to go back and remind myself of some of the lesser known things in my .emacs files that I wish I was making more use of. (Like ace-jump mode above!).