Good evening all--
The attached file adds m4 support.  It was tested against org-9.1.7 and used 
ob-sed.el and ob-shell.el for inspiration.  Both code execution and tangling 
have been tested with simple inputs as well as tables (easiest way to verify 
correctness is to inspect the tangled output).  It was good fun for an evening 
project (converting the tables to m4 list syntax was the trickiest part and 
required a foray into ob-shell.el; pcase is a nifty function).
When putting it together, I debated between putting the definitions 
representing variables in as -DNAME=value pairs in the command-line or putting 
them in the body of the generate file.  Even though it's a bit uglier, I 
decided to put them in the body of the file as it makes the generated file 
capable of being run by hand.
Finally, thanks for the work on org-mode and babel.  Vanilla org-mode has made 
my meeting notes are significantly easier and PDF exports look terrific.  
Likewise, while I've written numerous documents using R/knitr, I appreciate 
having a literate environment that supports additional languages.
--Brad

Attachment: ob-m4.el
Description: Binary data



Reply via email to