Fraga, Eric <> writes:

> On Monday,  6 Jan 2020 at 14:35, Samuel Wales wrote:
>> fyi i dimly recall that in babel's infancy, as a user new to lp and
>> using babel infrequently, i got confused about the difference while
>> reading the manual.  in fact, i wondered if the two features could be
>> the same thing but refactored.
> Tangling is for extracting code(s) from a document; exporting is for
> presentation or dissemination of that document.

Yes, that is how I have always thought of it. Exporting is about
exporting the document into a new format (PDF, HTML, Markdown etc). This
isn't really related to LP (it could be seen as a bit like 'weave' in LP
jargon I guess). Even without Babel, you would still want export in
order to publish your org documents in different formats.

Tangle on the other hand is the guts of LP. It is what extracts the code
in the source blocks into 'raw' code files i.e. *.c, *.java, *.py etc
and adds things like noweb references to enable you to build complete
source files from multiple separate source blocks (with references
etc). In addition, it provides the powerful feature of being able to
generate 'new' (results) content from your source blocks and insert
them back into the document which can then be exported, providing a
mechanism to create more dynamic documents, which I find very useful for
documenting a workflow process where the document becomes a log of the
process as well as documentation on exactly what the process is/does.

A good example of this is

Tim Cross

Reply via email to