emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] [BABEL] ob-rec.el and some questions


From: Jose E. Marchesi
Subject: Re: [Orgmode] [BABEL] ob-rec.el and some questions
Date: Tue, 15 Feb 2011 22:05:23 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux)

    > 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    address@hidden
GNU Project         http://www.gnu.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]