On Sat, Jul 10, 2021 at 5:01 AM Tassilo Horn <t...@gnu.org> wrote: > > Hongyi Zhao <hongyi.z...@gmail.com> writes: > > > The AUCTeX document on > > <https://www.gnu.org/software/auctex/manual/auctex/Multifile.html> > > says the following: > > > > If the variable is dwim, AUCTeX will try to avoid querying by > > attempting to “do what I mean”; and then change the file. > > > > But I'm still not so clear on the specific mechanism/algorithm denoted > > by “do what I mean”. > > AUCTeX will look at the TeX-master values in all buffers whose file > reside in the same directory as the current one
What will happen if the non-master files reside in sub-folders of the master file's directory? > and use the first > TeX-master value which is a string (and so denotes the path to the > master file). That's based on the assumption that one usually has a > layout like > > main.tex # The master file where TeX-master is t which includes > # the individual chapter files. > chapter1.tex # TeX-master is "main.tex" > chapter2.tex # TeX-master is "main.tex" > This seems cumbersome due to I must set TeX-master for each of them. > So when you now create a new chapter3.tex, it will most probably also > want to have TeX-master set to "main.tex". > > Obviously, this dwim method can do wrong guesses when you have multiple > multi-file documents in the same directory and work on several of them > at once. > Maybe a more intelligent algorithm should be developed. > HTH, > Tassilo > Regards -- Assoc. Prof. Hongyi Zhao <hongyi.z...@gmail.com> Theory and Simulation of Materials Hebei Vocational University of Technology and Engineering No. 473, Quannan West Street, Xindu District, Xingtai, Hebei province