From mboxrd@z Thu Jan 1 00:00:00 1970 From: jemarch@gnu.org (Jose E. Marchesi) Subject: Re: [BABEL] ob-rec.el and some questions Date: Tue, 15 Feb 2011 22:05:23 +0100 Message-ID: <87k4h1m2jw.fsf@gnu.org> References: <877hd2uxym.fsf@gnu.org> <87sjvp5dzr.fsf@gmail.com> <87zkpxm6zy.fsf@gnu.org> <87ei793ukr.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=55762 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PpSAZ-00054f-TA for emacs-orgmode@gnu.org; Tue, 15 Feb 2011 16:10:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PpSAY-0007uQ-PM for emacs-orgmode@gnu.org; Tue, 15 Feb 2011 16:10:47 -0500 Received: from fencepost.gnu.org ([140.186.70.10]:48406) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PpSAY-0007uC-NW for emacs-orgmode@gnu.org; Tue, 15 Feb 2011 16:10:46 -0500 In-Reply-To: <87ei793ukr.fsf@gmail.com> (Eric Schulte's message of "Tue, 15 Feb 2011 13:35:00 -0700") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric Schulte Cc: emacs-orgmode@gnu.org > Extracting the records from org tables or raw rec data, you mean? It > would be easy to use csv2rec and recins to implement a recins block: > Yes, I was thinking of something like the following. Rather than create a new block type, simply add a header argument (or body content) that (somehow) indicates that we are writing not reading. So for example writing an Org-mode table into a fresh .rec file would look like the following. #+tblname: org-data | Foo | Bar | |-----+-----| | 1 | a | | 2 | b | | 3 | c | | 4 | d | #+begin_src rec :data something.rec :var data=org-data :write some rec code to dump data into the rec file... #+end_src I like that approach, but I would put the raw rec code into the src block: #+begin_src rec :data something.rec :write Foo: 1 Bar: a Foo: 2 Bar: b ... #+end_src Then use a :table parameter in case we want to insert the contents of a table: #+begin_src rec :data something.rec :write :table org-data #+end_src I will work on this and will be back as soon as I have something working. Many thanks for the feedback :) -- Jose E. Marchesi jemarch@gnu.org GNU Project http://www.gnu.org