emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Org-babel and LaTeX letter


From: Eric S Fraga
Subject: Re: [O] Org-babel and LaTeX letter
Date: Wed, 07 Sep 2011 16:36:38 +0100
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux)

Ben Alexander <address@hidden> writes:

[...]

> Now perhaps is a good time to ask what the different workflows are for
> export, publish, babel and tangle.  They seem to have overlapping
> functionality.  My basic concept is:
>
> export : Your complete (or partial) org file in another form, like
> paper or on the web.  For when emacs isn't around and you don't want
> to forget what your orgmode file says, or for giving a copy of the
> data in your org file to someone who doesn't appreciate
> emacs. #+begin_latex blocks belong to this export.

I agree.

> publish : export more than one org file.  I've no idea what use case
> makes publish different than export.

Example: a web site.  The nice thing about publish is it only converts
those files which have changed (at least in my setup but that setup was
defined a while ago now so I cannot remember if that's the default).

> babel : use for including chunks of code in an org file.  Base use
> case simply allows you to easily edit them in a native emacs mode
> while still having them organized into your run-of-the-mill org file.
> Also allows code blocks to be printed more nicely (in color? with line
> numbers?) which doesn't happen in 'export' Secondary use case allows
> you to execute the code blocks #+begin_src and #+results: blocks
> belong to babel.  I plan on using ledger in babel blocks to store my
> often executed queries, even though most of the 'code' is on the
> command line.

Well, I would suggest that your "secondary" use case is actually the
primary use case?  And especially so when combined with the ability to
use inputs from org tables or to chain blocks so that results of one are
inputs to another.

> tangle : use case - lets you have lots of code blocks organized in an
> orgmode file become a complete, compilable program.  Normally the
> orgmode syntax would cause a complier to choke, so tangle removes the
> orgmode structure.  Added bonus: lets different programs co-operate in
> a single orgmode file.  Like a makefile on steroids? #+begin_src
> blocks can belong to tangle, too. 

Your first use case for *babel* above fits in here.  More to the point,
you can write truly descriptive text related to the program (including,
for instance, equations, diagrams, etc.) without the restrictions
imposed by normal commenting rules in the particular language(s) used.

> While the orgmode documentation does a great job of explaining how to
> configure the details of each process, I feel like I'm missing the
> how do I pick the feature that solves the problem I have right now'
> part.  Probably because each feature is flexible enough to be used in
> overlapping ways.

Yes, indeed!

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.7 (release_7.7.261.g2178)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]