emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: jemarch@gnu.org (Jose E. Marchesi)
To: Eric Schulte <schulte.eric@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [BABEL] ob-rec.el and some questions
Date: Tue, 15 Feb 2011 22:05:23 +0100	[thread overview]
Message-ID: <87k4h1m2jw.fsf@gnu.org> (raw)
In-Reply-To: <87ei793ukr.fsf@gmail.com> (Eric Schulte's message of "Tue, 15 Feb 2011 13:35:00 -0700")


    > 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

      reply	other threads:[~2011-02-15 21:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-14 21:07 [BABEL] ob-rec.el and some questions Jose E. Marchesi
2011-02-15 18:35 ` Eric Schulte
2011-02-15 19:29   ` Jose E. Marchesi
2011-02-15 20:35     ` Eric Schulte
2011-02-15 21:05       ` Jose E. Marchesi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k4h1m2jw.fsf@gnu.org \
    --to=jemarch@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=schulte.eric@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).