Literate programming and my Emacs configuration file
Posted: - Modified: | emacsUpdate 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 sach.ac/dotemacs. Share yours! =)
25 comments
Nicholas Manolakos
2012-06-08T17:56:36ZInteresting 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.
Gwenhael
2012-06-08T19:22:04ZInteresting.
Here's my much less neatly organized babel-init.org : http://dl.dropbox.com/u/317...
It's gone a bit messy with time but isn't that what .emacs all do?...
Travis B. Hartwell
2012-06-08T21:45:40ZHere's mine:
https://github.com/travisbh...
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!
Sacha Chua
2012-06-09T02:10:53ZOooooh. Thanks for sharing! Looking forward to borrowing interesting snippets. =D
Prabu Ayyagari
2012-06-09T14:55:24Z@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.
Sacha Chua
2012-06-09T18:21:27ZWhen 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.
Greg Tucker-Kellogg
2012-06-10T15:22:53ZSacha,
your config is an Org mode file with emacs lisp snipets. Do you have it called something like 'starter-kit-sacha.org' and then load it with (starter-kit-load "sacha"), or do you tangle out the elisp into a .el file?
Sacha Chua
2012-06-10T17:07:46ZThe Starter Kit automatically loads (username).org, so I have it saved as Sacha.org in my ~/.emacs.d. =)
Greg Tucker-Kellogg
2012-06-11T06:13:17ZThanks! (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.
Greg
2012-06-14T05:20:33Z(setq org-agenda-files '("~/personal/organizer.org" "~/personal/business.org"))
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 http://dl.dropbox.com/u/396... is unreadable. I looked at this a couple of days ago and it was fine.)
Sacha Chua
2012-06-14T14:45:33ZFixed 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 organizer.org 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.
Damon Haley
2012-06-18T02:17:23ZGreat post. It finally gave me the inspiration to publish my literate config instance also based on Eric Schulte's literate starter kit at:
https://github.com/dhaley/ewax.
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 Gwene.org. Combined with w3m using a tor privoxy proxy, I like the http://www.freedomboxfounda... 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.
Damon
Tom
2012-06-29T00:34:52ZThank 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!
Noorul
2012-07-19T11:49:38ZAre you not using Gnus these days?
Sacha Chua
2012-07-22T23:11:29ZNot at the moment. I should probably figure out how to get Gmail working nicely with Windows 7 and Gnus again...
Frieder Wittmann
2012-07-31T21:17:39ZMore 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.
[1] http://pgbovine.net/cde.html
Sacha Chua
2012-08-01T15:10:10ZThat would be an awesome way to let people try things out. =)
Arne Babenhauserheide
2012-10-22T02:27:40ZHaving 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.
Thanks!
jonnay
2013-05-24T19:33:07ZUsing org-babel for startup is truly the path to enlightenment. Here is my crack at it:
https://github.com/jonnay/e...
Thomas Worthington
2013-08-30T19:20:54ZThe Emacs starter kit link in the post is broken; it seems to have moved here:
http://eschulte.github.io/e...
Tomas Zellerin
2014-05-02T20:41:53ZSorry 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.
sachac
2014-05-04T02:29:38ZMmm... I use a quick shortcut to open my Sacha.org configuration file, so that's why I don't run into that - I don't use describe-function, I open my Sacha.org file and use isearch. =) Maybe that would work for you?
Tomas Zellerin
2014-05-05T15:56:33ZUnderstood, I may try that. However, that means working specially with functions I defined myself.
George Jones
2015-04-26T12:37:12ZI'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.
sachac
2015-05-09T03:10:25Zhttps://github.com/sachac/o... . I haven't updated in a while, though!