Org Babel Recipes

I find that one of the most useful features of the phenomenally useful Org mode is the Babel code block capability. You have to have facility with at least one programming language, of course, but this is Irreal so that’s probably not a problem if you’re reading this.

Code blocks can be useful for anyone who needs to massage some table data (tax data, say). Some, like John Kitchin, a Chemical Engineering Professor, use them extensively for reproducible research. Professional developers can leverage them like Howard Abrams does in this excellent post and video about literate devops.

Using code blocks is conceptually easy: you put some code—in any of several languages—in a source block and it gets executed and (can) automatically insert the results in the org document when you export the document or otherwise execute the block. There are details, though. The peculiarities of different languages mean that the details of using a language effectively differ between the languages. The Worg site has documentation for several languages, which is very useful.

Dfeich has put together a set of Babel recipes for several languages. They’re basically his notes for using the languages effectively in code blocks. If you’re using a language in a code block for the first time, it’s worth your while to take a look at his recipe (and the Worg documentation) to avoid any gotchas.

This entry was posted in General and tagged , . Bookmark the permalink.