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: Mon, 29 Aug 2011 13:02:17 -0600 Message-ID: <878vqc6nye.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> 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]:39904) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qy76H-0003Ah-IE for emacs-orgmode@gnu.org; Mon, 29 Aug 2011 15:02:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qy76G-0002lz-75 for emacs-orgmode@gnu.org; Mon, 29 Aug 2011 15:02:25 -0400 Received: from mail-pz0-f44.google.com ([209.85.210.44]:53022) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qy76F-0002lv-Tz for emacs-orgmode@gnu.org; Mon, 29 Aug 2011 15:02:24 -0400 Received: by pzk36 with SMTP id 36so10418636pzk.17 for ; Mon, 29 Aug 2011 12:02:23 -0700 (PDT) In-Reply-To: (=?utf-8?Q?=22Andr?= =?utf-8?Q?=C3=A1s?= Major"'s message of "Mon, 29 Aug 2011 18:50:11 +0000 (UTC)") 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: =?utf-8?Q?Andr=C3=A1s?= Major Cc: emacs-orgmode@gnu.org Andr=C3=A1s 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 the patch!). If this proves >> confounding in the future we can always revisit the decision. > > 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 already possible, see "Indexable variable values" [1]. > I agree that wildly mixing cell types in a table should be a felony, > but "mixing" them the way I'd like to makes perfect sense. You would > then simply make more than one :var to specify multiple subtables, > each with its own type. I think this might be better than > brute-forcing everything to string just so that the asymptote program > has to parse the values back to numbers. > > What do you think? > I must admit by the time I got to this thread is was already many messages deep, and I haven't read the initial messages, so I don't know what your way of mixing was, but from my current understanding of asymptote the behavior implemented by Nick's patch seems to make the most sense, in that it allows tables of ints and floats, but when a single string is present it converts the table to all strings. Best -- Eric > > Andr=C3=A1s > > > Footnotes:=20 [1] http://orgmode.org/manual/var.html --=20 Eric Schulte http://cs.unm.edu/~eschulte/