>>>>> Arash Esbati <ar...@gnu.org> writes:
> ,----[ C-h v TeX-arg-input-file-search RET ]
> | TeX-arg-input-file-search is a variable defined in ‘latex.el’.
> | 
> | Its value is t
> | 
> |   You can customize this variable.
> | 
> | If ‘TeX-arg-input-file’ should search for files.
> | If the value is t, files in TeX’s search path are searched for
> | and provided for completion.  The file name is then inserted
> | without directory and extension.  If the value is nil, the file
> | name can be specified manually and is inserted with a path
> | relative to the directory of the current buffer’s file and with
> | extension.  If the value is ‘ask’, you are asked for the method
> | to use every time ‘TeX-arg-input-file’ is called.
> `----

> Important part is the last sentence: If ask, you're asked *every time*.
> The way I see it, only the function `TeX-arg-input-file'[1] follows this
> description, `TeX-arg-document'[2] and
> `LaTeX-arg-usepackage-read-packages-with-options'[3] don't.  For example
> in `TeX-arg-document', the user isn't queried once
> `LaTeX-global-class-files' is non-nil, i.e., the user answers `n' once
> and is never asked after that, unless user hits `C-u C-c C-n'.  That
> doesn't fit the bill with "asked every time".  WDYT?

Indeed. It seems that in early days of AUCTeX `TeX-arg-document' (T-a-d)
didn't use `TeX-arg-input-file-search' and
`LaTeX-arg-usepackage-read-packages-with-options' (L-a-u-r-p-w-o) didn't
exist. Earlier AUCTeX used `TeX-arg-input-file-search' only in
`TeX-arg-input-file' and I suppose that its doc string was written in
those days.
In general, .cls and .sty files aren't likely to be added nor removed
during one emacs session. So my guessed scenario is:
1. The author of L-a-u-r-p-w-o, who also injected
   `TeX-arg-input-file-search' in T-a-d, thought that it's reasonable to
   use constant list of files for `TeX-global-input-files' and
   `LaTeX-global-class-files' once they've got non-nil.
2. So he just diverted `TeX-arg-input-file-search' in his code and
   didn't obey the phrase "asked every time" there, letting the phrase
   be true only for `TeX-arg-input-file'.

> I've changed my solution accordingly.  Any comments welcome.

It now looks good to me. ;-)

Regards,
Ikumi Keita


Reply via email to