emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] input data for babel blocks


From: Alan Schmitt
Subject: Re: [O] input data for babel blocks
Date: Tue, 01 Oct 2013 10:15:53 +0200
User-agent: mu4e 0.9.9.5; emacs 24.3.1

Hi Eric,

address@hidden writes:

>> - would the patch above be a useful way to deal with this?
>
> My problem with the patch above is that it makes OCaml different from
> every other language (especially ob-haskell which has similar type
> restraints), and that it doesn't work for tables with different
> alignment, e.g.,
>
> | x | y |
> | 0 | 1 |
>
> I guess one possible "correct" solution would be to use a variant type
> with something like the following.
>
>     type orgCell =
>       | Int of int
>       | Float of float
>       | String of string

Yes, this would be more flexible. However, this type definition must
occur only once (when the session is launched). Looking at the code, I'm
not sure how to ensure that.

>> - is there a way to specify the :var parsing in a code block or in the
>> table?
>>
>
> Currently there is not.  Perhaps there is an elegant solution using a
> new header argument to control how values are represented in literal
> source code.
>
> This is an interesting question.  I'm not sure what is best here, but
> ideally any solution will generalize to other strongly typed languages,
> will support all possible tables, and will work simply for simple tables
> allowing users to use tables without having to jump through typed hoops.

I'll try to apply Charles's suggestion, once I'm able to fully
understand it, and I'll report it here.

Alan



reply via email to

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