auctex-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AUCTeX 14.0.0 in ELPA


From: Ikumi Keita
Subject: AUCTeX 14.0.0 in ELPA
Date: Fri, 09 Feb 2024 21:37:27 +0900

Hi all,

There are a lot of reports incoming now about installation failure of
the new ELPA release. They are categorized into two classes:
1. The user attempted upgrade in a emacs session where AUCTeX is already
   used.
2. Fresh installation fails with (void-function LaTeX-mode) error in a
   subsequent emacs session.

The category 1 is expected failure; it can be circumvented by using
"emacs -Q" session (maybe "emacs -q" is enough.) However, category 2 is
serious. We have to fix it soon.

I currently think that the culprit is the loading order of tex-site.el
and auctex-autoloads.el as described below.

I wrote the relevant portion of tex-site.el.in assuming that various
autoloads in tex-site.el, including the one for `LaTeX-mode', _follows_
the parts generated from tex-site.el.in. This holds for configure-make
installation scheme. However, it seems that the order is reversed in
ELPA installation scheme; In ELPA installation,
[1] tex-site.el contains no autoload declarations; there are only parts
    generated from tex-site.el.in.
[2] auctex-autoloads.el, which doesn't exist in configure-make
    installation, contains
----------------------------------------------------------------------
;;; Generated autoloads from tex-site.el

 (require 'tex-site)
----------------------------------------------------------------------
    _after_ the autoload declaration of `LaTeX-mode'.

I assumed that the following code in tex-site.el(.in) runs _before_
AUCTeX autoload declaration for LaTeX-mode in order to eliminate the
alias predefined by tex-mode.el:
----------------------------------------------------------------------
;; Delete aliases predefined in tex-mode.el so that AUCTeX
;; autoloads provided below take precedence.
(TeX--alias-overlapped-modes)
----------------------------------------------------------------------
In ELPA installation, the autoload for LaTeX-mode provided by AUCTeX goes
without this elimination and have no effect because elisp function
`autoload' doesn't overwrite existing alias. In addition, in the
subsequent loading of tex-site.el, the above code eliminates that
alias, hence leading to (void-function LaTeX-mode) when opening a
LaTeX file.

When I moved
----------------------------------------------------------------------
;;; Generated autoloads from tex-site.el

 (require 'tex-site)
----------------------------------------------------------------------
to the early stage in auctex-autoloads.el and restarted emacs session,
everything works fine. Thus I think that my above consideration is
right.

Is there any simple way in ELPA installation scheme to sort out the
order of autoload declaration and (require 'tex-site)? I haven't yet
considered whether it's possible to fix tex-site.el.in to work with both
configure-make installation and ELPA installation.

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW



reply via email to

[Prev in Thread] Current Thread [Next in Thread]