emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] ob-lua.el


From: Dieter Schoen
Subject: Re: [O] ob-lua.el
Date: Fri, 09 May 2014 22:23:04 +0200
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (Gojō) APEL/10.8 EasyPG/1.0.0 Emacs/24.3.50 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

At Wed, 07 May 2014 00:46:03 +0200,
Bastien wrote:
> 
> Hi Dieter,
> 
> address@hidden 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



reply via email to

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