Re: [NTG-context] problem with package.path

2010-05-07 Thread Taco Hoekwater
Hans Hagen wrote: On 7-5-2010 10:52, Taco Hoekwater wrote: Peter Münster wrote: On Thu, May 06 2010, Hans Hagen wrote: \startbuffer[test] bla = nil \stopbuffer \savebuffer[test][../mytest.lua] \starttext \startluacode package.path = "../?.lua;;" require("mytest") \stopluacode \stoptext dofil

Re: [NTG-context] problem with package.path

2010-05-07 Thread Hans Hagen
On 7-5-2010 10:52, Taco Hoekwater wrote: Peter Münster wrote: On Thu, May 06 2010, Hans Hagen wrote: \startbuffer[test] bla = nil \stopbuffer \savebuffer[test][../mytest.lua] \starttext \startluacode package.path = "../?.lua;;" require("mytest") \stopluacode \stoptext dofile "../mytest.lua"

Re: [NTG-context] problem with package.path

2010-05-07 Thread Taco Hoekwater
Peter Münster wrote: On Thu, May 06 2010, Hans Hagen wrote: \startbuffer[test] bla = nil \stopbuffer \savebuffer[test][../mytest.lua] \starttext \startluacode package.path = "../?.lua;;" require("mytest") \stopluacode \stoptext dofile "../mytest.lua" Bad example... mytest.lua is a module, s

Re: [NTG-context] problem with package.path

2010-05-07 Thread Hans Hagen
On 7-5-2010 9:15, Peter Münster wrote: On Thu, May 06 2010, Hans Hagen wrote: \startbuffer[test] bla = nil \stopbuffer \savebuffer[test][../mytest.lua] \starttext \startluacode package.path = "../?.lua;;" require("mytest") \stopluacode \stoptext dofile "../mytest.lua" Bad example... mytest

Re: [NTG-context] problem with package.path

2010-05-07 Thread Peter Münster
On Thu, May 06 2010, Hans Hagen wrote: >> \startbuffer[test] >> bla = nil >> \stopbuffer >> \savebuffer[test][../mytest.lua] >> \starttext >> \startluacode >> package.path = "../?.lua;;" >> require("mytest") >> \stopluacode >> \stoptext > > dofile "../mytest.lua" Bad example... mytest.lua is a m

Re: [NTG-context] problem with package.path

2010-05-06 Thread Hans Hagen
On 4-5-2010 10:28, Peter Münster wrote: Hello, I need to include lua-modules from different directories, but package.path does not seem to work: \startbuffer[test] bla = nil \stopbuffer \savebuffer[test][../mytest.lua] \starttext \startluacode package.path = "../?.lua;;" require("mytest") \stop

Re: [NTG-context] problem with package.path

2010-05-04 Thread Peter Münster
On Tue, May 04 2010, Peter Münster wrote: > package.path = "../?.lua;;" Ok, I see, the paths must be separated by colons: package.path = "path1/?.lua:path2/?.lua" But it's not very comfortable, since some of my luafiles are processed by lua¹ *and* by context². ¹ To generate code. ² To generate