Subject: bug#64834: 28.2; Auctex fails to load properly

From: Tassilo Horn <[email-masked]>
Date: Mon, 24 Jul 2023 18:37:51 +0200

Eli Zaretskii <[email-masked]> writes:

Hi Roger and Eli,

>> From: Roger Lipsett <[email-masked]>
>> Date: Mon, 24 Jul 2023 11:08:24 -0400
>> 
>> I recently switched from an Intel Mac to an Apple Silicon mac, and
>> Auctex no longer loads properly.

How did you switch?  Especially, did you copy over ~/.emacs.d/elpa/?

>> If I start an emacs server, set debug-on-error to t, and try to load
>> a .tex file, I get the following, and the first line below continues
>> until I get the message "error lisp nesting exceeds
>> 'max-lisp-eval-depth'".
>>
>>   internal--fill-string-single-line("Use the command `TeX-Omega-mode' to change this va...")
>>   internal--fill-string-single-line("Use the command `TeX-Omega-mode' to change this va...")
>>   internal--fill-string-single-line("Use the command `TeX-Omega-mode' to change this va...")
>>   internal--format-docstring-line("Use the command `%s' to change this variable." TeX-Omega-mode)
>>   #f(compiled-function (arg1 arg2 &rest rest) "Define a new minor mode MODE.\nThis defines the

I cannot reproduce that.  I've tried emacs 28.2 with auctex 13.2.1 (on
GNU/Linux) from ELPA with a sample TeX file also declaring TeX-engine:
omega as a file local property.  The (obsolete) TeX-Omega-mode is
properly activated.

>> If I also set debug-on-signal and try to byte-compile tex.el, which is
>> where the previous error seemed to occur, I get the following:
>> 
>> Debugger entered--Lisp error: (void-variable ansi-color-faces-vector)
>>   default-toplevel-value(ansi-color-faces-vector)
>>   custom-initialize-reset(ansi-color-faces-vector (funcall #'#f(compiled-function () #<bytecode
>> 0x1ca1c2cd84e54>)))

That also works fine for me...  Do you also get that error when starting
a fresh emacs and evaluating (require 'ansi-color) in *scratch* or M-:?
Actually, ansi-color-faces-vector does exist in emacs 28.2 though it is
obsolete.  Do you use that variable somewhere in your configuration?  It
looks a bit like you would use it without requiring ansi-color first...

>> In GNU Emacs 28.2 (build 1, aarch64-apple-darwin21.1.0, NS appkit-2113.00 Version 12.0.1 (Build
>> 21A559))
>>  of 2023-02-22 built on armbob.lan
>> Windowing system distributor 'Apple', version 10.3.2299
>> System Description:  macOS 13.4

It's hard to tell what's wrong here.  I'd start by looking at the output
of M-x list-load-path-shadows RET to check if there are obsolete elisp
files on the load-path.  If there aren't, I'd try nuking
~/.emacs.d/elpa/ and reinstalling the packages anew so that they are
byte-compiled again (with emacs 29.1, there's a package-recompile-all
command making that much easier).

Bye,
Tassilo