Noweb as glue

Álvaro Ramírez has a revealing post about using noweb with Org mode in an unusual way. Most of us think of noweb as a way of doing Literate Programming. It enables the insertion of previously named text in another place. Ramírez reasoned that it would be a good way gluing the contents of Org blocks or their results into another block.

If you’re not familiar with the noweb system, the way you include a block—NAMED-BLOCK, say—is to put where you want to text to appear. Ramírez pointed out something I didn’t know: If you want the results of evaluating the block, rather than the verbatim contents, you can use instead.

Ramírez’s post has examples of both methods. The second, more complicated example shows how complex data generated in one block using Elisp can be included in another block using a different language. Even if, like me, you don’t know anything about Swift Charts, you won’t have any trouble following the process of using noweb to glue the results together.

There are, of course, other ways of doing this but using noweb is an easy method that doesn’t require remembering a lot of syntax.Take a look at the post for the details. It’s a nice technique.

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