#+TITLE: Emacs orgmode init theory phlog #+AUTHOR: screwlisp I was struggling a lot to write today since it's meant to be introductory. It seems like there's some duty to say something other people will regard as normal. Here I am derelicting that duty. I simply moved the trivial init of my ==travel laptop== into org files, and added an interactive org file evaluation at the emacs startup hook. I'm publishing this idea as this one's ==.emacs.d== (emacs config directory). Basically I learned a lot writing this and am very happy with my startup hook orgmode buffer execution. If you are an advanced user but not familiar with org-babel and are a bit confused, there is an appendix at the end of this file. * Files ** config.org This file has no role in config. It was my original file and contains a lot of exposition. It does however have a functional role. It contains the definition of the function that gets called to append new headings + source blocks to the config- files. ** config-front.org This file's source blocks are tangled into my-org-config-front.el. These source blocks have configs that should happen early, like loading early packages. Just do C-c C-v t in this file. (After adding new blocks by C-c C-cing the call line). *** my-org-config-front.el This is the generated ('tangled') elisp file that happens first in init.el. ** config-back.org This file's source blocks are tangled into my-org-config-back.el. These source blocks happen towards the end of initialisation. In this case, I set up the emacs startup hook (what happens after initialisation). Just do C-c C-v t in this file. (After adding new blocks by C-c C-cing the call line). *** my-org-config-front.el This is the generated ('tangled') elisp file that happens last in init.el. ** config-startup.org These source blocks, when marked :eval yes, a user who has interactively started emacs (with 'emacs' or 'emacsclient -c -a ""') will be sequentially prompted yes/no to evaluate these source blocks. I put integrated sly and external clim sbcl slime in here. ** init.el.txt The middle part of this file is generated by emacs, and shouldn't be touched. Mere mortals can do things at the front and back of the file. Mine just loads the front.. .el at the front and back.. .eg at the back. * org-babel :appendix: Basically org files' source blocks can be shared with other org files. This involves adding the org file to The Library Of Babel (of your emacs session). You do this with the elisp, ==(org-babel-lob-ingest "path/to/my/file.org")==. "file.org" is hopefully unique or enough-namestring will be weird. After lob-ingestion, you can C-c C-c on #+BEGIN_EXAMPLE ,#+CALL: file.org:source-block-name(params) :header1 val1 :header2 :val2 #+END_EXAMPLE in orgmode. Now you too know.