summaryrefslogblamecommitdiffstats
path: root/2020/info/14.md
blob: a49b302e980761ff77eac51dc4be5c2f30d8e9eb (plain) (tree)
1
2
3


                                        
























                                                                        
# Literate Programming in Emacs Org-Mode
Adam Ard

Org mode, among its numerous features, has the ability to do full
literate programming (with tangling and weaving the way Donald Knuth
originally intended).  As a programmer, you can work comfortably,
completely inside an org-mode buffer.  When you are ready, emacs will
generate the appropriate documentation and source code files for you.
If you are a lone emacs user on your project, simply commit these
exported files and keep your org file to yourself – no one is the
wiser.

Watch "Literate Programming in Emacs Org-mode" to learn how you can
annotate code snippets in an org file so they can be automatically
exported to their proper locations in your source tree.  Keep
important information about your project where it should be: right
next to the code itself.  Not as ugly, out-of-date notes sitting
behind comment characters in your source files, but front and center
in well-formatted markdown and pdf files.

And, for advanced use cases, see how you can even use a full-fledged
macro processor like m4 to personalize your workflow even more.
Literate programming on steroids!

I'll walk you through the whole process, starting from an empty
project README.org to a simple example that generates source and
documentation.