I saw multiple style files using `TeX-auto-add-regexp', but sorry, I don't understand how this is related to multi-file documents. If this is explained clearly somewhere in the documentation, please let me know, but I haven't found it yet.
On Wed, Sep 18, 2024 at 1:56 PM Arash Esbati <ar...@gnu.org> wrote: > Leo Stein <leo.st...@gmail.com> writes: > > > Regarding multifile documents, do I understand correctly that this is > > the job of reftex? > > No, this has nothing to do with RefTeX, it's exclusively AUCTeX's > business to cater for completion candidates of graphics files. > > > It would indeed be nice to avoid regexing the whole document each time > > you do \includegraphics. But, if somebody goes back and edits their > > previous \graphicspath command, a re-parse would be needed... I don't > > know what is the best way to handle this. > > I think the easiest way is to plug this into AUCTeX's parsing abilities. > Search the files under style/ directory for `TeX-auto-add-regexp' and > you will get a lot of examples. But since parsing in AUCTeX is > expensive reg. regexp groups, you should make this addition conditional > and provide a custom variable for users who want to enable this feature. > > Best, Arash >