Subject: Re: bug#70817: 14.0.3.2024-03-17; max-lisp-eval-depth exceeded with XeTeX option

From: "Landis Florian (ladi)" <[email-masked]>
Date: Wed, 8 May 2024 06:56:22 +0000

Hi Arash,

You're right, AUCTeX loads the file just fine if emacs is started with 
the -Q switch. Does that mean that there's something else in my 
configuration of Emacs (or AUCTeX?) that is tripping AUCTeX up? I 
wouldn't even know where to start looking...

In the meantime, the solution that works for me is to reduce the local 
variable list to:

%%% Local Variables:
%%% TeX-engine: xetex
%%% coding: utf-8
%%% End:

I think the line

%%% mode: latex

is the culprit in my case. Was there an infinite loop between AUCTeX 
loading latex-mode automatically and again due to the local variables?

Best,

Florian

Am 07.05.2024 um 15:42 schrieb Arash Esbati:
> Hi Florian,
>
> "Landis Florian (ladi)" <[email-masked]> writes:
>
>> if I choose XeTeX with a comment-option at the end of the document,
> In Emacs jargon, they're called file local variables or local variable
> list.
>
>> opening the file results in Emacs saying tha max-lisp-eval-depth has
>> been exceeded.
>>
>> As a result, running the AUCTeX shortcuts for running LaTeX, does not
>> work (without defaults given).
>>
>> Leaving out below option and doing 'M-x TeX-engine-set RET xetex'
>> produces no hiccups.
> Hmm, I have no problems with opening a test file like this:
>
> --8<---------------cut here---------------start------------->8---
> \documentclass{article}
>
> \title{Minimal working example}
> \author{Florian}
> \begin{document}
> \maketitle
>
> \begin{document}
>
> \section{What happens}
>
> This does not load AUCTeX correctly with the XeTeX commented option at
> the end of the document, but works fine without it.  With the option,
> Emacs says that 'max-lisp-eval-depth' is exceeded and commands for
> compiling the document under AUCTeX are not available.
>
> Leaving out below option and doing 'M-x TeX-engine-set RET xetex'
> produces no hiccups.
>
> \end{document}
>
> %%% Local Variables:
> %%% mode: LaTeX
> %%% TeX-master: t
> %%% TeX-engine: xetex
> %%% coding: utf-8
> %%% End:
> --8<---------------cut here---------------end--------------->8---
>
>> Emacs  : GNU Emacs 28.1 (build 2, x86_64-w64-mingw32)
>>    of 2022-04-21
>> Package: 14.0.3.2024-03-17
> It seems you've installed AUCTeX from ELPA, maybe you can update
> (though I don't think that would solve the issue.)
>
> Do you get this issue also when starting with "emacs -Q"?  You need to
> start emacs with -Q switch and then eval this in scratch:
>
> (progn
>    (package-initialize t)
>    (package-activate 'auctex))
>
> Now open your .tex file.
>
> Best, Arash