From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Bug: Babel: asymptote: erroneous conversion of heterogeneous-typed table Date: Mon, 29 Aug 2011 19:27:49 +0200 Message-ID: <87vctgi0ve.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> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:32951) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qy5dM-00058d-BM for emacs-orgmode@gnu.org; Mon, 29 Aug 2011 13:28:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qy5dL-0008EC-CL for emacs-orgmode@gnu.org; Mon, 29 Aug 2011 13:28:28 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:39605) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qy5dL-0008E5-59 for emacs-orgmode@gnu.org; Mon, 29 Aug 2011 13:28:27 -0400 Received: by wyi11 with SMTP id 11so4727692wyi.0 for ; Mon, 29 Aug 2011 10:28:26 -0700 (PDT) In-Reply-To: <87y5yc6tx4.fsf@gmail.com> (Eric Schulte's message of "Mon, 29 Aug 2011 10:52:34 -0600") 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: Eric Schulte Cc: =?utf-8?Q?Andr=C3=A1s?= Major , emacs-orgmode@gnu.org 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 problem of the OP. You can choose between int[][], real[][] or string[][] (and other types specific to Asymptote and, as such, irrelevant here), but you never want an heterogeneous table. So, the real question is: what should Org do when an user tries to fit a mixed array into an Asymptote var? Until now, it was throwing an error. With this patch, _one_ string in the table will trigger the string type for every other cell. But this kind of an hidden feature. The user has to be aware that, under some circumstances, ints in his table will become strings. On the other hand, an user knowing he can't mix types in Asymptote (as he should) can't do much about it, as far as I know. As I said in this thread, an elegant solution would be to have a way to specify Babel to output tables of strings easily: | x | "1" | "2" | "3" | | y | "1" | "4" | "9" | That would be the less surprising, as the user would get the type he sees in his table. Regards, -- Nicolas Goaziou