At Wed, 07 May 2014 00:46:03 +0200,
Bastien wrote:
>
> Hi Dieter,
>
> [email protected] writes:
>
> > for a project I need to tangle lua files (including parameters and
> > tables),
> > and there seems to be no ob-lua.el (yet).
> >
> > so I shamelessly copied ob-python.el and adapted it to my needs.
> > right now it can tangle lua, also with simple or table parameters.
> >
> > if anybody is interested, I can upload it.
>
> Yes, please do!
>
> > before that, it should maybe be completed, and also pass some generic
> > tangle test, I think.
> > I have shortly looked at testing/examples/ob-shell-test.org. Is a
> > test like this suitable?
>
> I suggest to look at testing/lisp/test-ob-shell.el.
>
sorry for the delay, I had to fix some quoting..
here is what i have already. it is not yet ERT tested, only manually.
ob-lua.el is capable to tangle code which uses tables with one, two or many
columns.
i have not yet done any code executing tests.
first, here is my test harness:
#+NAME: simple-table
| simple one |
| two |
| three |
is converted into
sim={{"simple one"}, {"two"}, {"three"}}
#+NAME: assoc-table
| name | value |
|---------+-------|
| colour | blue |
| weather | fine |
this is converted into
mapv={{"colour", "blue"}, {"weather", "fine"}}
i copied this behaviour (an associative map) from ob-shell.el
#+NAME: big-table
| name | value | remark |
|-------------+--------+--------|
| tool | emacs | cool |
| environment | debian | fair |
and finally,
big={{"tool", "emacs", "cool"}, {"environment", "debian", "fair"}}
<#part type="text/x-org" filename="/home/dieter/git/org/code-exporter.org"
disposition=attachment>
<#/part>
and ob-lua.el
<#part type="application/emacs-lisp"
filename="/home/dieter/.emacs.d/elpa/org-20140505/ob-lua.el"
disposition=attachment>
<#/part>
as i am quite new to emacs/org, i will be thankful for any feedback.
kind regards,
dieter