From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dieter Schoen Subject: Re: ob-lua.el Date: Fri, 09 May 2014 22:23:04 +0200 Message-ID: <87y4yau2fr.wl%dieter@schoen.or.at> References: <871tw64jbo.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54582) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WirK5-0002mv-Oq for emacs-orgmode@gnu.org; Fri, 09 May 2014 16:23:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WirK0-0000Br-Eq for emacs-orgmode@gnu.org; Fri, 09 May 2014 16:23:13 -0400 Received: from postrelay210.edis.at ([91.227.204.210]:38008) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WirK0-0000Bh-8c for emacs-orgmode@gnu.org; Fri, 09 May 2014 16:23:08 -0400 Received: from mailrelay.edis.at (postrelay210.edis.at [91.227.204.210]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by postrelay210.edis.at (Postfix) with ESMTPS id 2100720020FB for ; Fri, 9 May 2014 22:23:06 +0200 (CEST) In-Reply-To: <871tw64jbo.fsf@bzg.ath.cx> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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