Skip to content

Latest commit

 

History

History
40 lines (33 loc) · 871 Bytes

20210704110247-literate_programming_with_org_mode.org

File metadata and controls

40 lines (33 loc) · 871 Bytes

Literate programming with org-mode

Example

See https://orgmode.org/manual/Extracting-Source-Code.html

First set :tangle header args. This is the location which the file will be written.

:PROPERTIES:
:HEADER-ARGS: :tangle lit-test.el
:END:

Now, just by calling org-babel-tangle a file called lit-test.el is created with the following code blocks written to it separated by a couple newlines.

Block 1

(print "foo2")

Block 2

(print "bar2")