[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX-devel] Interface of kpathsea file search
From: |
David Kastrup |
Subject: |
Re: [AUCTeX-devel] Interface of kpathsea file search |
Date: |
Wed, 23 Nov 2005 16:00:45 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
Ralf Angeli <address@hidden> writes:
> Can anybody tell me what's the deal with the interface of
> `TeX-search-files-kpathsea'? A few months ago I already added a
> FIXME comment about it being inconsistent with `TeX-search-files'
> and now I found a real bug related to it.
>
> When one tries to insert a \usepackage macro, `LaTeX-arg-usepackage'
> will let-bind `TeX-file-extensions' to '("sty"). Then (in
> `TeX-arg-input-file') `TeX-search-files' will be called with that
> value as argument for the EXTENSIONS parameter. `TeX-search-files'
> will pass that value on to `TeX-search-files-kpathsea' also as the
> EXTENSIONS parameter. But it is not used as a list of extensions.
> Rather its car is used as a format key for looking up some
> extensions mapped in `TeX-kpathsea-format-alist'. Apart from that
> construction being completely insane, in this case it leads to a
> `kpsewhich -expand-path=' call (i.e. no argument for -expand-path is
> supplied) because there is no entry for "sty" extensions in
> `TeX-kpathsea-format-alist'.
We should probably check for this case.
> A failing kpsewhich call alone would not be so problematic but when
> this happens `TeX-kpathsea-path-delimiter' is set to nil and the
> kpathsea-based search will be disabled globally.
>
> I found all of this while trying to do a completion with TAB on
> "babel" after a `C-c RET usep TAB RET'. The said thing is that the
> fact I noticed the problem means that `TeX-search-files' without the
> kpathsea-based search does not find babel.sty. Duh.
>
> Okay, in order to fix the former bug I can add a
> ("sty" "${TEXINPUTS}" '("sty"))
> to `TeX-kpathsea-format-alist',
More likely ${TEXINPUTS.latex}.
> but I am not really feeling comfortable with this because it is a
> misuse of the variable and the interface of
> `TeX-search-files-kpathsea'.
Actually, I can't see the misuse here. Looks like the intended use to
me.
> Sooner or later we will have to do this right.
Well, that is the mantra of AUCTeX altogether.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum