Leo Stein <leo.st...@gmail.com> writes:

> I searched in this mailing list's archives but couldn't find a
> previous mention of this suggestion; sorry if it's already been
> discussed.  The ffap-latex-mode function already does some non-trivial
> things, like running kpsewhich to locate .cls or .sty file when point
> is in a \documentclass or \usepackage command. I was wondering if it
> would be possible to leverage AUCTeX to further improve its handling
> of where to search when point is in an \input command. LaTeX looks in
> paths specified by \input@path, which the author may (re)define or
> prepend/append to (see
> e.g. https://tex.stackexchange.com/a/79060/34063 ).

Let me just mention that \input@path is an interal macro and not a
public one available to authors in order to be redefined or extended  --
\graphicspath is a different beast.

> Is it possible to parse the document for such (re)definitions, and
> provide additional paths to ffap-latex-mode via some defadvice? Or is
> this too complicated to do robustly?

ffap.el is an Emacs core library; I suggest you ask Emacs maintainers
about this addition.  If they agree, this can also be useful for people
who use the builtin LaTeX-mode.

Reg. usefulness: I'm not sure if I would agree if I was in charge.
epslatex.pdf has a section about this kind of additions (13 Using
Subdirectories).  Maybe the reasons given there don't apply to modern
TeX installations and computers anymore, but in general, supporting
non-public commands inside an editor is asking for trouble (IMHO) and
using Kpathsea is much more reliable.

Best, Arash

Reply via email to