[tex-live] texdoc in luatex
frank at kuesterei.ch
Fri Jul 20 15:21:28 CEST 2007
Hi, sorry for coming back so late, but I was on holiday and took a week
to work through my backlog and recover...
David Kastrup <dak at gnu.org> wrote:
> Akira Kakuto <kakuto at fsci.fuk.kindai.ac.jp> writes:
>>> -for path in string.gmatch(pathlist, "[^:]*") do
>>> +for path in string.gmatch(pathlist, "[^:;]*") do
>>> should do.
>> Unfortunately that does not work.
>> While in the case of
>> for path in string.gmatch(pathlist, "[^;]*") do
> Personally, I'd prefer something like (don't know the expressions,
> for matching purposes, independent of platform. It will mean that
> under Unix, single-character relative directory specs will have to be
> preceded with "./" in order to be recognized correctly. And it will
> disallow using either : or ; within paths itself (except for a
> directory spec).
I'm not sure we understand each other (and wheter I always said sensible
things in the past, don't have that old mails any more).
This string.gmatch with : and/or ; is only used twice in texdoclua, and
that is when iterating over the contents of a list returned by kpathsea
when looking up variables. At a first approximation, there's no drive
letters involved, just lists of paths (or extensions, in the case of
TEXDOCEXT) from texmf.cnf.
So the right handling depends on the path separators used. On my Linux
kpsewhich --expand-braces '$TEXDOCS'
results in a list with `:' as the separator. Of course if I split the
list at this character, drive specifiers on Windows will be split of,
too - that's the problem.
To find a clean solution, I think I need to know whether the separators
are consistent among systems: If it's always `:' on Unix-likes and
always `;' on Windowsen, then I don't see the need for "complicated"
regexes, we just split at the unique, system-dependent separator. Only
if the separator is not that predictable, then do we need to do the
Single Molecule Spectroscopy, Protein Folding @ Inst. f. Biochemie, Univ. Zürich
Debian Developer (teTeX/TeXLive)
More information about the tex-live