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

2011-08-31 Thread Eric Schulte
Nicolas Goaziou writes: > Hello, > > Nick Dokos writes: > >> András Major 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 va

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

2011-08-31 Thread Nicolas Goaziou
Hello, Nick Dokos writes: > András Major 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 occur

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

2011-08-31 Thread Nick Dokos
András Major 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 fact, I'm qui

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

2011-08-30 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

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

2011-08-30 Thread Eric Schulte
András Major writes: > 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

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: lis

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

2011-08-30 Thread Eric Schulte
András Major 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 just like in t

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

2011-08-30 Thread András Major
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 just like in table references. > > This is

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

2011-08-29 Thread Nick Dokos
Eric Schulte wrote: > András Major 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 all strings. I've just > >> appl

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

2011-08-29 Thread Eric Schulte
András Major 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 all strings. I've just >> applied your previous patch (thanks for th

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 > c

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

2011-08-29 Thread Eric Schulte
Nicolas Goaziou writes: > Hello, > > Eric Schulte 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 ty

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

2011-08-29 Thread Nicolas Goaziou
Hello, Eric Schulte 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 Asymptote, hence the pro

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

2011-08-29 Thread Eric Schulte
Nicolas Goaziou 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 in > the ta

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 Nicolas Goaziou
András Major 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. - #+tblname: mixe

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

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

2011-08-29 Thread Nicolas Goaziou
András Major 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 limitation of Asymptote. A

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

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 th

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

2011-08-29 Thread Nick Dokos
Major A 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 with double-quotes bu

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

2011-08-29 Thread Nicolas Goaziou
Hello, Major A 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 with double-quotes but n

[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 asymptot