From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: Bug: Babel: asymptote: erroneous conversion of heterogeneous-typed table Date: Wed, 31 Aug 2011 06:14:27 -0600 Message-ID: <874o0x6an0.fsf@gmail.com> References: <20110829080003.GA12790@discus> <87hb50li4b.fsf@gmail.com> <878vqclf64.fsf@gmail.com> <87mxesjs9e.fsf@gmail.com> <87fwkkjhvt.fsf@gmail.com> <87y5yc6tx4.fsf@gmail.com> <87vctgi0ve.fsf@gmail.com> <87hb506qqk.fsf@gmail.com> <878vqc6nye.fsf@gmail.com> <87ei0266dw.fsf@gmail.com> <878vqa62lo.fsf@gmail.com> <10851.1314778677@alphaville.dokosmarshall.org> <87obz5hqjf.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:41394) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qyjgh-0006z1-K8 for emacs-orgmode@gnu.org; Wed, 31 Aug 2011 08:14:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qyjgg-0003jS-1C for emacs-orgmode@gnu.org; Wed, 31 Aug 2011 08:14:35 -0400 Received: from mail-gx0-f169.google.com ([209.85.161.169]:38162) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qyjgf-0003jI-Uu for emacs-orgmode@gnu.org; Wed, 31 Aug 2011 08:14:33 -0400 Received: by gxk23 with SMTP id 23so514283gxk.0 for ; Wed, 31 Aug 2011 05:14:33 -0700 (PDT) In-Reply-To: <87obz5hqjf.fsf@gmail.com> (Nicolas Goaziou's message of "Wed, 31 Aug 2011 11:35:32 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Nicolas Goaziou Cc: =?utf-8?Q?Andr=C3=A1s?= Major , nicholas.dokos@hp.com, emacs-orgmode@gnu.org Nicolas Goaziou writes: > Hello, > > Nick Dokos writes: > >> Andr=C3=A1s Major wrote: >> >>> Hi Eric, >>>=20 >>> > Can you post an example? Here is a working example. >>>=20 >>> 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 this case. >>>=20 >> >> Yes, even without any asymptote code, this breaks. But there seem to be >> multiple problems. One is fix-empty-lines, a local routine defines >> inside org-babel-asymptote-table-to-array: it seems to assume that the t= able >> is a list of lists, whereas in this case it's a list of strings. The >> following patch (which probably is wrong, in that it cures the symptom >> rather than the disease): > > Yes, the problem is more general: uni-dimensional lists are not handled > correctly. > > I attach a patch that should fix the problem (and simplify a lot that > whole process). > > One thing, though. Now, > > | 1 | 2 | > > and (but this was already the case) > > | 1 | > | 2 | > > are treated as bi-dimensional arrays, because that's how they really are > passed to ob-asymptote. > Thanks Nicolas, both of these patches are now applied. -- Eric --=20 Eric Schulte http://cs.unm.edu/~eschulte/