[Dev-luatex] running scripts from UNC paths

Taco Hoekwater taco at elvenkind.com
Thu Apr 15 18:18:32 CEST 2010

T T wrote:
> On 15 April 2010 16:34, Taco Hoekwater <taco at elvenkind.com> wrote:
>> Or any other older version, I'm sure. All commandline related stuff
>> is in luainit.w, I think.
> I probably need to svn up, because I can only find luainit.c, no luainit.w.
>> And now I suddenly see what is going wrong: your backslash is
>> intercepted by the code that looks for "luatex \\relax ...".
> OK, you will probably know how to fix this better than I do (still
> can't find that in the code).

Should be fixed by #3621 (in branches/0.60.x/, so far) please try
it out.

> Another question (two actually). In ex_selfdir function in luainit.c
> you derive derive the directory of the executable from argv[0] using
> SearchPath(). Is this intended (argv[0] might not correspond to the
> actual executable) or are you actually after the real path of the
> executable (in which case GetModuleFileName() should be used)?

This is most probably on purpose. I inherited the current code from
kpathsea, and I think it makes sense to do what kpathsea does in case
someone wants to replace kpathsea by lua code (like Hans does).

> The second question is what is this path used used for?  It is exposed
> on the Lua side through os.selfdir, but this is not documented, so I
> wonder if one can rely on it or if it is some internal thing.

os.selfdir should have been documented already, it has slipped
through the cracks somehow. I'll fix the manual.

Best wishes,

More information about the dev-luatex mailing list