Literate programming and my Emacs configuration file

Update 2013-08-30: Changed Emacs Starter Kit link. Thanks, Thomas!

Inspired by the Emacs Starter Kit and the literate programming features in org-babel, I reviewed and organized my Emacs configuration. I’m looking forward to adding more notes to my configuration as I explore!

Literate programming is the idea that you should write first and program second, and that you can interweave the program into your explanation. Nifty.

Here’s my Emacs configuration (you can also find it at Share yours! =)

4 Pingbacks/Trackbacks

  • Interesting idea. I kind of do the opposite. Instead of writing traditional notes.

    I write then in JSON and use a NOSQL browsing engine to explore the results in different templates/perspectives like lists, tagcloulds, connections.

  • Interesting.

    Here’s my much less neatly organized :

    It’s gone a bit messy with time but isn’t that what .emacs all do?…

  • Here’s mine:

    I’d been considering doing something like this. I’ve been wanting to clean up some of the cruft in parts, so this might be a good opportunity to do so.

    Looks great!

    • Oooooh. Thanks for sharing! Looking forward to borrowing interesting snippets. =D

  • @Sacha – Thanks for sharing. The comments in the .emacs file help me as I set up my org mode instance. Question: when you used Lotus Notes, what was your workflow for work-related calendar items? Did you copy from Lotus Notes (without call-in details) into org mode so it showed up in the agenda? If yes, did you then have to refer to the original to dial into conference calls?

    @Gwen, @Travis – thanks for sharing.

  • When I was on Lotus Notes, I used an internal script that someone else in IBM put together in order to convert appointments into iCal. That made it easier. I also sometimes created manual entries for important dates. Never quite got it fully integrated, though.

  • GTK


    your config is an Org mode file with emacs lisp snipets. Do you have it called something like ‘’ and then load it with (starter-kit-load “sacha”), or do you tangle out the elisp into a .el file?

  • The Starter Kit automatically loads (username).org, so I have it saved as in my ~/.emacs.d. =)

  • GTK

    Thanks! (How did I miss that?) I also can’t seem to get show-paren-mode to work. It seems to highlight both parens when on the opening paren, but not the closing paren.

  • (setq org-agenda-files ‘(“~/personal/” “~/personal/”))

    You keep everything in two files? (Or at least only include TODOs in two .org files.) How big and how deeply nested are these? How do you archive?

    (BTW, the yellow font in is unreadable. I looked at this a couple of days ago and it was fine.)

  • Fixed the colour scheme by changing my share function to temporarily switch to a light-background scheme. Thanks for pointing that out!

    609,304 bytes in my file, probably because I haven’t archived old weekly reviews. Many notes become blog posts, so I use the Org archive function to stash those after publishing on my blog.

    I’ve added short descriptions of my other files in the My files section of my Org configuration. I rediscovered quite a few files I’d forgotten! =) My main Org file has the following headings: Reference, Blog ideas, Stuff to watch out for, Projects, Weekly review, Monthly review, Snippets, Routines, Tasks, 2011, and 2012.

  • Great post. It finally gave me the inspiration to publish my literate config instance also based on Eric Schulte’s literate starter kit at:

    I’ve already taken some items from your recently published config. As you’ll see there are quite a few sacha prefixed functions in mine.

    My literate config needs lots more annotation (as I get time) to actually explain the stuff I find most useful.

    I also need to document how I’m using Howard’s Rheingold’s PLN idea of filtering RSS feeds inside Yahoo Pipes (from his book Net Smart) with Gnus virtual groups and Combined with w3m using a tor privoxy proxy, I like the idea of not being tracked by Facebook and other marketing companies while pulling the useful parts of the web into emacs.

    I’m also fully incorporated Bernt Hansen’s GTD config, which is one of the most masterful I’ve seen.

    It would eventually be nice to have a list of all the published starter kit instances, so we could borrow new Emacs 24 config items from each other.


  • Tom

    Thank you for sharing this, your init/org file and the links you posted really helped me to get started with this, before this I couldn’t see the use of trying this and I really didn’t get how it worked in org. But now I’m working on making my init file literate as well, here‘s the HTML version (if you’re interested) of what I have so far.

    I got a little hooked on it and actually went a little overboard, I’m trying to get (almost) all of my dotfiles (sources) in this format using a bunch of makefiles. It’s a nice excercise in Makefile, writing and configuration file management and I’m having lots of fun with it. And since this is the post that really got me started with it: Thanks!

  • Are you not using Gnus these days?

  • Not at the moment. I should probably figure out how to get Gmail working nicely with Windows 7 and Gnus again…

  • Frieder Wittmann

    More interesting would be to have a virtual machine image or at least a self sustaining code package, without outside dependencies (like CDE [1]) so one can _practically_ reproduce the science.


  • That would be an awesome way to let people try things out. =)

  • arnebab

    Having a virtual machine image would be really cool, but impractical for me: We already struggle with disk-space for all the meteorological input data, so creating a virtual machine which needs another full copy of the input data would be a huge ordeal.

    I try to keep close to published input data, though, and to document every step I do to process it for the models I use.

    But CDE actually sounds pretty nice – though I prefer sharing sources. I want people to not just be able to redo what I did, but to be able to work on it. And for that they need the sources. But just being able to run the program is a nice first step. → went into my remember file.


  • Pingback: Literate Programming Links | Bills Blog()

  • Using org-babel for startup is truly the path to enlightenment. Here is my crack at it:

  • Pingback: Literate Programming Links – Revised | Bills Blog()

  • Thomas Worthington

    The Emacs starter kit link in the post is broken; it seems to have moved here:

  • Tomas Zellerin

    Sorry for reacting to this slightly aged post, but for me, there is some pain there as the descriptions(as in describe-function) of objects defined in org-babel point to tangled file, not to the original. So unless I take care, I find myself editing the generated file, not the original source. I could (in fact, in few cases I did) some modifications of load-history variable at the end of the generated file, but I wonder if it noone else sees this as a problem, or if I miss something trivial/do something wrong.

    • Mmm… I use a quick shortcut to open my configuration file, so that’s why I don’t run into that – I don’t use describe-function, I open my file and use isearch. =) Maybe that would work for you?

      • Tomas Zellerin

        Understood, I may try that. However, that means working specially with functions I defined myself.

  • Pingback: Literate Programming and Your Emacs Configuration | Irreal()

  • Pingback: Literate Programming with Emacs | Quantum Mechanic()

  • George Jones

    I’ve delared .emasrc (init.el) bankrupcy, in part bacause org2blog broke … your confg says

    “I used to use punchagan’s org2blog, but there’s a completely different one in ELPA, so I figured I’d give that a try. UPDATE 2014-10-29: Overriding it with the Git version”

    Can you point me at the .git repo for the org2blog you are using now ? Thanks.