From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: input data for babel blocks Date: Mon, 30 Sep 2013 18:08:16 -0600 Message-ID: <87mwmtrguj.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35058) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQnY3-0005CP-0x for emacs-orgmode@gnu.org; Mon, 30 Sep 2013 20:10:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VQnXy-0006Q2-RE for emacs-orgmode@gnu.org; Mon, 30 Sep 2013 20:10:42 -0400 Received: from mail-pa0-x22a.google.com ([2607:f8b0:400e:c03::22a]:56700) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQnXy-0006OR-Jb for emacs-orgmode@gnu.org; Mon, 30 Sep 2013 20:10:38 -0400 Received: by mail-pa0-f42.google.com with SMTP id lj1so6609580pab.29 for ; Mon, 30 Sep 2013 17:10:37 -0700 (PDT) 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: Charles Berry Cc: emacs-orgmode@gnu.org Charles Berry writes: > Alan Schmitt polytechnique.org> writes: > >> >> Hello, >> >> In my quest for analyzing my data in org mode tables, I'm trying to see >> if I can use my favorite language (i.e., ocaml). I'm thus looking at how > > [discussion of revising org-babel-variable-assignments: deleted] > >> >> I have the following questions for the list: >> - can I always assume that tables are passed as lists of lists? >> - would the patch above be a useful way to deal with this? >> - is there a way to specify the :var parsing in a code block or in the table? > > Alan, > > Nice description of a problem that has vexed me, too. > > It would be nice to have more flexibility in passing objects to src blocks > in ones favored language via the :var header arg. > > Lacking that, another alternative to the approach you have crafted is to > use elisp src blocks to set up the commands needed to create the objects, > and then place the results of executing the elisp src block in the src > block of your favored language using noweb, for example > > #+BEGIN_SRC mylang :noweb yes > <> > #+END_SRC > > might convert 'arg2' to an object of the desired type named 'arg1' in a > 'mylang' src block. > > FWIW, my own usage of this approach is to write LaTeX code including > backslashes and unmatched quotes, then convert the code to a valid R > character string for labelling figures (which undoubled backslashes and > unmatched quotes would invalidate). > > HTH, > > Chuck > Hi Chuck, This looks like a very powerful approach, with the added benefit of not requiring the addition of any new constructs to Org-mode code blocks. For now I'd say this is the best way to handle these typing problems. I'd say it would be nice to document this solution somewhere, but I have no idea where would be a good place for it to live (i.e., where future users would find it), so hopefully for now text search through the mailing list will suffice. With that in mind please ignore the following string of keywords which are purely for SEO. table type string integer number cell tuple strongly typed haskell ocaml Cheers, -- Eric Schulte https://cs.unm.edu/~eschulte PGP: 0x614CA05D