Re: [dev-context] context commands in lua-files

2010-07-18 Thread Peter Münster
On Sun, Jul 18 2010, Taco Hoekwater wrote: If you start your files like this: command = command or {} command['placefloat'] = { comment = Insert a floating element., ... } then they could easily all be merged into a single command table during loading or even via 'cat'.

Re: [dev-context] context commands in lua-files

2010-07-18 Thread Peter Münster
On Sat, Jul 17 2010, Mojca Miklavec wrote: A few random comments from externalfigure: - Despite the fact that the command name is known from filename, wouldn't it be nice to have externalfigure string defined somewhere? Ok, see response to Taco. - It is not really needed, but it helps when

Re: [dev-context] context commands in lua-files

2010-07-18 Thread Peter Münster
On Sun, Jul 18 2010, Taco Hoekwater wrote: arguments = { [label_arg] = { type = label, }, [filename_arg] = { type = file, }, [settings_arg] = { type = settings,

Re: [dev-context] context commands in lua-files

2010-07-18 Thread Mojca Miklavec
On Sun, Jul 18, 2010 at 09:38, Peter Münster wrote: On Sat, Jul 17 2010, Mojca Miklavec wrote: - It is not really needed, but it helps when cross-referencing: I would nevertheless leave the [1] = {...}, [2] = {...} for arguments - The following:     settings = {         inherit =

Re: [dev-context] context commands in lua-files

2010-07-18 Thread Peter Münster
On Sun, Jul 18 2010, Peter Münster wrote: - If all the three arguments are optional, it's a bit difficult to tell what combination of arguments is allowed, so it might make sense to be a bit more verbose in that (to tell somehow that for example only 123 and 23 and 3 is allowed, but not

Re: [dev-context] context commands in lua-files

2010-07-18 Thread Peter Münster
On Sun, Jul 18 2010, Taco Hoekwater wrote: variants = { -- just an example { filename_arg }, { label_arg, filename_arg }, { label_arg, filename_arg, settings_arg }, { filename_arg, parent_arg }, Now I see the big benefit! Instead of having 2

Re: [dev-context] context commands in lua-files

2010-07-18 Thread Hans Hagen
On 18-7-2010 8:09, Taco Hoekwater wrote: On 07/17/2010 09:32 PM, Peter Münster wrote: On Sat, Jul 17 2010, luigi scarso wrote: Why don't put them into a table as is in http://www.lua.org/pil/10.1.html Ok, now one file defines exactly one command table. I added also other minor enhancements.