From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Schmitt Subject: Re: input data for babel blocks Date: Tue, 01 Oct 2013 10:15:53 +0200 Message-ID: References: <87siwlrgun.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42818) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQv7i-0003pX-O4 for emacs-orgmode@gnu.org; Tue, 01 Oct 2013 04:16:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VQv7b-0008Cl-8s for emacs-orgmode@gnu.org; Tue, 01 Oct 2013 04:16:02 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:62412) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQv7b-0008CK-2V for emacs-orgmode@gnu.org; Tue, 01 Oct 2013 04:15:55 -0400 In-reply-to: <87siwlrgun.fsf@gmail.com> 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: emacs-org list Hi Eric, schulte.eric@gmail.com writes: >> - would the patch above be a useful way to deal with this? > > My problem with the patch above is that it makes OCaml different from > every other language (especially ob-haskell which has similar type > restraints), and that it doesn't work for tables with different > alignment, e.g., > > | x | y | > | 0 | 1 | > > I guess one possible "correct" solution would be to use a variant type > with something like the following. > > type orgCell = > | Int of int > | Float of float > | String of string Yes, this would be more flexible. However, this type definition must occur only once (when the session is launched). Looking at the code, I'm not sure how to ensure that. >> - is there a way to specify the :var parsing in a code block or in the >> table? >> > > Currently there is not. Perhaps there is an elegant solution using a > new header argument to control how values are represented in literal > source code. > > This is an interesting question. I'm not sure what is best here, but > ideally any solution will generalize to other strongly typed languages, > will support all possible tables, and will work simply for simple tables > allowing users to use tables without having to jump through typed hoops. I'll try to apply Charles's suggestion, once I'm able to fully understand it, and I'll report it here. Alan