As time goes, my .emacs file grows so large that I find it difficult to organise, to switch things on/off and document the references where I found solutions for certain tasks. I decided to use Org to organise my .emacs file so that I can have emacs-lisp code and descriptions all in one file with sections.
My dotemacs.org has two parts. The first part initialise Org for loading the second part, where most of the settings are.
MELPA has to be loaded before Org is loaded. This part of the file will be tangled into a file called dotemacs.
The rest of the dotemacs.org file
Here is where you put your emacs settings. This part of the file will be tangled into a file called dotemacs.el
The first part of the org file is tangled into a file called “dotemacs” (because I put “dotemacs” after :tangle). Now all you need to do is to make a symbolic link .emacs in your home directory to point to this dotemacs file.
Then emacs will load the dotemacs.org to tangle the rest of the settings into dotemacs.el. Org is smart enough not to recompile dotemacs.el if nothing is changed.
Alternative method - not using Org at all
Neglecting all of the above, there is another way to organise your emacs settings. That is to put your settings into separate .el files and include them using the
require command in your .emacs file like this:
And you will have your python-mode setting in