Re: [O] Bug: Babel: asymptote: erroneous conversion of heterogeneous-typed table

2011-08-31 Thread András Major
Hi Eric, Can you post an example? Here is a working example. In your example, simply write asymptote in place of sh and replace the code by size(100); just to make sure it's valid asymptote (though the error occurs even if you don't). In fact, I'm quite sure that asy never gets executed in

Re: [O] Bug: Babel: asymptote: erroneous conversion of heterogeneous-typed table

2011-08-31 Thread Nick Dokos
András Major andras.g.ma...@gmail.com wrote: Hi Eric, Can you post an example? Here is a working example. In your example, simply write asymptote in place of sh and replace the code by size(100); just to make sure it's valid asymptote (though the error occurs even if you don't). In

Re: [O] Bug: Babel: asymptote: erroneous conversion of heterogeneous-typed table

2011-08-31 Thread Nicolas Goaziou
Hello, Nick Dokos nicholas.do...@hp.com writes: András Major andras.g.ma...@gmail.com wrote: Hi Eric, Can you post an example? Here is a working example. In your example, simply write asymptote in place of sh and replace the code by size(100); just to make sure it's valid asymptote

Re: [O] Bug: Babel: asymptote: erroneous conversion of heterogeneous-typed table

2011-08-31 Thread Eric Schulte
Nicolas Goaziou n.goaz...@gmail.com writes: Hello, Nick Dokos nicholas.do...@hp.com writes: András Major andras.g.ma...@gmail.com wrote: Hi Eric, Can you post an example? Here is a working example. In your example, simply write asymptote in place of sh and replace the code by

Re: [O] Bug: Babel: asymptote: erroneous conversion of heterogeneous-typed table

2011-08-30 Thread Eric Schulte
András Major andras.g.ma...@gmail.com writes: Hi Eric, I've been away since my last post and now you've already applied a patch -- wow! Here's another thought though: change the behaviour of the :var header argument such that you can specify a range of rows, columns, or a rectangle

Re: [O] Bug: Babel: asymptote: erroneous conversion of heterogeneous-typed table

2011-08-30 Thread András Major
Hi Eric, This is already possible, see Indexable variable values [1]. Just tried, without success. Using the example from my original post, I appended [,0] as per the manual to use the first column only, and when I execute the code block, org throws an error Wrong type argument: listp, 0.

[O] Bug: Babel: asymptote: erroneous conversion of heterogeneous-typed table

2011-08-29 Thread Major A
Hi, I'd like to use asymptote to plot the values in an Org table. The table has cells with numbers but also cells with strings in them. This table gets converted to an array of strings in the resulting asymptote file, with the strings escaped with double-quotes but not the numbers. In

Re: [O] Bug: Babel: asymptote: erroneous conversion of heterogeneous-typed table

2011-08-29 Thread Nicolas Goaziou
Hello, Major A andras.g.ma...@gmail.com writes: I'd like to use asymptote to plot the values in an Org table. The table has cells with numbers but also cells with strings in them. This table gets converted to an array of strings in the resulting asymptote file, with the strings escaped

Re: [O] Bug: Babel: asymptote: erroneous conversion of heterogeneous-typed table

2011-08-29 Thread Nick Dokos
Major A andras.g.ma...@gmail.com wrote: Hi, I'd like to use asymptote to plot the values in an Org table. The table has cells with numbers but also cells with strings in them. This table gets converted to an array of strings in the resulting asymptote file, with the strings escaped

Re: [O] Bug: Babel: asymptote: erroneous conversion of heterogeneous-typed table

2011-08-29 Thread András Major
Hi Nicolas, I'd like to use asymptote to plot the values in an Org table. The table has cells with numbers but also cells with strings in them. This table gets converted to an array of strings in the resulting asymptote file, with the strings escaped with double-quotes but not the

Re: [O] Bug: Babel: asymptote: erroneous conversion of heterogeneous-typed table

2011-08-29 Thread András Major
Hi Nick, I don't know anything about asymptote and I am not sure whether this will help: it does produce a temp file with everything quoted and running asy on the temp file produces an .eps file that contains the diagonal line, but it produces a png file which seems somewhat peculiar to me

Re: [O] Bug: Babel: asymptote: erroneous conversion of heterogeneous-typed table

2011-08-29 Thread Nicolas Goaziou
András Major andras.g.ma...@gmail.com writes: This isn't what I need. What I want is to make a graph of certain columns of a table which contains both ints and strings. Ideally, there should be no constraint about which columns contain ints and which contain strings. Again, this is a

Re: [O] Bug: Babel: asymptote: erroneous conversion of heterogeneous-typed table

2011-08-29 Thread András Major
Why? You can always write an intermediary step to stringify every cell. Choose your language. Nick Dokos showed you one way. Apparently, only if you set a global/per-user option in .emacs or suchlike, which I think is a bad way of doing it. Why isn't it possible to force ob-asymptote to make

Re: [O] Bug: Babel: asymptote: erroneous conversion of heterogeneous-typed table

2011-08-29 Thread Nicolas Goaziou
András Major andras.g.ma...@gmail.com writes: Why? You can always write an intermediary step to stringify every cell. Choose your language. Nick Dokos showed you one way. Apparently, only if you set a global/per-user option in .emacs or suchlike, which I think is a bad way of doing it. -

Re: [O] Bug: Babel: asymptote: erroneous conversion of heterogeneous-typed table

2011-08-29 Thread Nicolas Goaziou
Completing myself. Though, you insist on being able to enter it as a number anyway, hoping ob-asymptote will do the magic behind. How could it, since the language can't itself? Actually, the attached patch does that magic: if there's any string in the table, every cell will be turned into a

Re: [O] Bug: Babel: asymptote: erroneous conversion of heterogeneous-typed table

2011-08-29 Thread Eric Schulte
Nicolas Goaziou n.goaz...@gmail.com writes: Completing myself. Though, you insist on being able to enter it as a number anyway, hoping ob-asymptote will do the magic behind. How could it, since the language can't itself? Actually, the attached patch does that magic: if there's any string

Re: [O] Bug: Babel: asymptote: erroneous conversion of heterogeneous-typed table

2011-08-29 Thread Nicolas Goaziou
Hello, Eric Schulte schulte.e...@gmail.com writes: I don't know asymptote well enough to know if you would /always/ want a heterogeneous table to be converted to all strings, or if there would ever be a case where you would want mixed types in a table. There are no mixed types arrays in

Re: [O] Bug: Babel: asymptote: erroneous conversion of heterogeneous-typed table

2011-08-29 Thread Eric Schulte
Nicolas Goaziou n.goaz...@gmail.com writes: Hello, Eric Schulte schulte.e...@gmail.com writes: I don't know asymptote well enough to know if you would /always/ want a heterogeneous table to be converted to all strings, or if there would ever be a case where you would want mixed types in a

Re: [O] Bug: Babel: asymptote: erroneous conversion of heterogeneous-typed table

2011-08-29 Thread András Major
Hi Eric, Given that asymptote can not make use of heterogeneous tables, it seems that it would be easiest to simply silently converted any table containing a single string element to a table of all strings. I've just applied your previous patch (thanks for the patch!). If this proves

Re: [O] Bug: Babel: asymptote: erroneous conversion of heterogeneous-typed table

2011-08-29 Thread Nick Dokos
Eric Schulte schulte.e...@gmail.com wrote: András Major andras.g.ma...@gmail.com writes: Hi Eric, Given that asymptote can not make use of heterogeneous tables, it seems that it would be easiest to simply silently converted any table containing a single string element to a table of