See below and attached. On 2021-04-06 3:14 a.m., Ikumi Keita wrote:
It looks like the value of the tex-master variable has also been overwritten. Auctex seems to think that the local buffer from the included file is the master.The latter shows that emacs didn't analysed your Local Variables section. In addition, it is very strange to see "without a source file." for it. It should be "defined in ‘files.el’." under usual circumastances. It seems that something overwrote the definition of `file-local-variables-alist' and I suspect that is the origin which hinders analysis of your Local Variables section. It's likely that "something" is outside of AUCTeX because AUCTeX does nothing on `file-local-variables-alist' other than reading its value.
Or could it be that Auctex does not read that variable when file is loaded (rather than it being overwritten)? When I delete the local variable and put it back in again, the value for tex-master is:
Value in #<buffer chap2.tex> "../main" as expected.
Anyway, it's almost impossible to say something other than guess without concrete example. As I said before, please provide sample set of documents which doesn't work for you in order to examine whether the problem is inside of AUCTeX or not.
See attached .zip of the .tex MWE
And I'd like you to do "M-x TeX-submit-bug-report" in the buffer of your sub file after trying C-c C-c, to help investigating diagnoses.
I will submit the bug report.
<<attachment: MWE.zip>>
