> I was thinking that maybe there could be like a general purpose framework that helps you build such a config.

Yes, that's a good idea. However, I've decided that literate programming is not a good idea. It appears you are into PHP so you have no problem with mixing languages together (PHP and HTML for instance). But I believe in things like the Smarty Templates for PHP, where everything is kept separate. 

I thought org-mode was a brilliant way to keep on top of the complexity of configuring emacs because it just gets bigger and bigger and certainly org-mode/babel have their advantages - one single file for the whole damned thing!

But as a programmer, I am going to be forced to use the elements of computer programmer to structure and manage the complexity of an emacs file.

But I have learned a lot by playing with this. I had never heard of many of the packages that I will now integrate into my day to day emacs setup. 

Thanks again for your help.