emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Dieter Schoen <dieter@schoen.or.at>
To: emacs-orgmode@gnu.org
Subject: Re: ob-lua.el
Date: Fri, 09 May 2014 22:23:04 +0200	[thread overview]
Message-ID: <87y4yau2fr.wl%dieter@schoen.or.at> (raw)
In-Reply-To: <871tw64jbo.fsf@bzg.ath.cx>


At Wed, 07 May 2014 00:46:03 +0200,
Bastien wrote:
> 
> Hi Dieter,
> 
> dieter@schoen.or.at 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	other threads:[~2014-05-09 20:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-06 22:34 ob-lua.el dieter
2014-05-06 22:46 ` ob-lua.el Bastien
2014-05-09 20:23   ` Dieter Schoen [this message]
2014-05-06 23:25 ` ob-lua.el John Busch
  -- strict thread matches above, loose matches on Subject: below --
2014-05-09 20:26 ob-lua.el dieter
2014-05-12 15:26 ` ob-lua.el Eric Schulte
2014-05-13 10:57   ` ob-lua.el Dieter Schoen
2014-05-21  7:30     ` ob-lua.el Bastien
2014-05-24 10:55       ` ob-lua.el Dieter Schoen
2014-05-24 12:25         ` ob-lua.el Bastien
2014-05-24 21:17           ` ob-lua.el Dieter Schoen
2014-05-25  5:24             ` ob-lua.el Bastien
2014-05-26 20:57               ` ob-lua.el Dieter Schoen
2014-05-29 17:57                 ` ob-lua.el Bastien

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=87y4yau2fr.wl%dieter@schoen.or.at \
    --to=dieter@schoen.or.at \
    --cc=emacs-orgmode@gnu.org \
    /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).