[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dwim as the value of TeX-master
From: |
Tassilo Horn |
Subject: |
Re: dwim as the value of TeX-master |
Date: |
Fri, 09 Jul 2021 22:52:20 +0200 |
User-agent: |
mu4e 1.5.13; emacs 28.0.50 |
Hongyi Zhao <hongyi.zhao@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 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"
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.
HTH,
Tassilo