Abdelrazak Younes wrote:

> Agreed but, well, I wanted to remove this code from findtexfile but then
> it is used in Latex.C and I am not sure it is useful there.

It is used there on purpose IIRC. findtexfile was designed for exactly this
use case: Find a file, using the same search algorithm as TeX.
I don't blame you for no knowing that, because (as so often) it is not
documented.

>>> In practice, this means that we cache only files that are in the texmf
>>> tree and there is no room for confusion.
>> 
>> Not good. We should cache all files. This makes the code simpler.
> 
> As you prefer... It can be done with a map. No strong opinion on that...

Well, the cache is a map, isnt it? And we should always store FileNames, no
strings please.

> Personally I don't like utility function that do two independant things
> like this finxdtexfile(). An utility function should do one thing and do
> it well IMHO.

I agree, but in this case I think it is doing one simple thing: Use the TeX
serach algorithm to find a file.

> Well, I think this is misleading somewhat. Because if you use a local
> bib file that has the same name as one in the Textmf tree, then you
> don't know which one you are using. I think we should prefix './' to the
> local one.

This was simply designed to work exactly as it works in LaTeX. If we want to
change that, then we should not store the filenames in a comma separated
list, but use something similar to the new InsetCommandParams, and for each
file store also a flag whether it comes from texmf or not. Using a "./"
prefix for that is too fragile IMHO: "./xyz" will not be found using
kpsewhich if it is not local, but "xyz" will both be found using kpsewhich
and as a local file.

But please: We need to get 1.5.0 out of the door, so lets keep the bibfile
storage as it is. If you know an easy way to fix the reload problem that is
fine, but without redesigning the bibfile storage please.

> Agreed but for me relative path means './toto' and not 'toto'.

Concerning the file system that is the same. Both will work. This seems to
be a personal preference.


Georg

Reply via email to