[Top][All Lists]

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

Re: [O] input data for babel blocks

From: Charles Berry
Subject: Re: [O] input data for babel blocks
Date: Mon, 30 Sep 2013 16:26:00 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Alan Schmitt <alan.schmitt <at> polytechnique.org> writes:

> Hello,
> In my quest for analyzing my data in org mode tables, I'm trying to see
> if I can use my favorite language (i.e., ocaml). I'm thus looking at how

[discussion of revising org-babel-variable-assignments:<lang> deleted]

> I have the following questions for the list:
> - can I always assume that tables are passed as lists of lists?
> - would the patch above be a useful way to deal with this?
> - is there a way to specify the :var parsing in a code block or in the table?


Nice description of a problem that has vexed me, too.

It would be nice to have more flexibility in passing objects to src blocks
in ones favored language via the :var header arg.

Lacking that, another alternative to the approach you have crafted is to
use elisp src blocks to set up the commands needed to create the objects,
and then place the results of executing the elisp src block in the src
block of your favored language using noweb, for example

#+BEGIN_SRC mylang :noweb yes
might convert 'arg2' to an object of the desired type named 'arg1' in a 
'mylang' src block.

FWIW, my own usage of this approach is to write LaTeX code including 
backslashes and unmatched quotes, then convert the code to a valid R
character string for labelling figures (which undoubled backslashes and 
unmatched quotes would invalidate).



reply via email to

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