emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] org babel support for tcl and awk


From: Sebastien Vauban
Subject: Re: [O] org babel support for tcl and awk
Date: Tue, 24 May 2011 21:55:39 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (windows-nt)

Hi Eric(s),

Eric Schulte wrote:
> Eric S Fraga <address@hidden> writes:
>> this is great to see as I use awk quite often. What is involved in
>> extending this to be able to run an awk script on input from within the org
>> file (output of another babel block, for instance, as my typical use of awk
>> is to re-arrange output from another program...)? Or, if you wish, can you
>> suggest one of the ob-XXX modules that best illustrates how to do this and
>> I can give it a try?
>
> I've made a quick change so that any variable named "stdin" is treated
> specially, in that, rather than using its value to replace strings of $stdin
> in the text of the awk code, the value of the stdin variable is saved into
> the file processed by awk. This allows awk to operate over Org-mode
> references.
>
> If babel code block supported a pipe or an actual stdin header argument,
> that would be the ideal way to add this behavior, but currently nothing of
> that nature exists.
>
> Please let me know if this misses part of your suggestion, or more generally
> what else may be advisable before we add this to the core.

Could this be implemented for sh as well?

AFAI understand, this is exactly the missing piece for me to be able to:

- run consecutive partial blocks of code in my Org buffer (seeing what they
  really do on input data),

- export the full list of block as a script.

This was described in
http://www.mail-archive.com/address@hidden/msg36976.html, and still
impossible -- for me! -- to do right now. But I'm not very sure I wrote my
thoughts in an enough understandable way -- maybe not clear enough to me?

Best regards,
  Seb

-- 
Sébastien Vauban




reply via email to

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