[Top][All Lists]

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

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

From: Eric Schulte
Subject: Re: [O] org babel support for tcl and awk
Date: Tue, 24 May 2011 06:51:58 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)


Are you aware of the ob-template.el file [1], which can be used as a
jumping off point to simplify the addition of new languages?  After
globally replacing the term "template" with you language name, the only
function that necessarily needs to be re-written is the main
`org-babel-execute:template' function.

I would recommend starting with only non-session based evaluation, and
then slowly adding functionality.  If you run into any specific problems
I am happy to help trouble shoot.

As an example, I've worked up an very simple ob-awk.el file from
ob-template.el, it is attached along with an example org-mode file which
demonstrates its usage.

Best -- Eric

Attachment: ob-awk.el
Description: application/emacs-lisp

* example use of ob-awk

Header Arguments
- cmd-line :: command line flags to pass to =awk=
- in-file :: the text file on which to run the resulting =awk= script

Currently only string results are returned directly from STDOUT.

Currently only external (i.e., non-session) evaluation is supported.

#+begin_src awk :in-file columns-of-numbers.txt
  {print $1}

: 0
: 1
: 2
: 3
: 4
: 5
: 6
: 7
: 8

"address@hidden" <address@hidden> writes:

> Hi,
> I am looking for support for Tcl (and AWK) for org-babel.  Both have a
> supplied emacs mode and Tcl also has an inferior interpreter mode.  I
> was trying to do it myself, however I am quite lost in the
> instructions.  Is there someone with the knowledge and willingness to
> provide a support file for org babel for Tcl (and maybe awk)?
> thanks.

[1]  http://repo.or.cz/w/Worg.git/blob/HEAD:/org-contrib/babel/ob-template.el

Eric Schulte

reply via email to

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