auctex-devel
[Top][All Lists]
Advanced

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

Re: AUCTeX and "builtin latex mode" integration


From: Christopher Dimech
Subject: Re: AUCTeX and "builtin latex mode" integration
Date: Thu, 22 Sep 2022 16:38:15 +0200

> Sent: Thursday, September 22, 2022 at 9:33 PM
> From: "Ikumi Keita" <ikumi@ikumi.que.jp>
> To: "Stefan Monnier" <monnier@iro.umontreal.ca>
> Cc: "Tassilo Horn" <tsdh@gnu.org>, "David Kastrup" <dak@gnu.org>, 
> auctex-devel@gnu.org
> Subject: Re: AUCTeX and "builtin latex mode" integration
>
> Hi Stefan and all,
>
> > I think it's on gnu.emacs.help, aka help-gnu-emacs.
>
> I read the thread.
>
> > It started with someone complaining that rainbow-delimiters doesn't work
> > with LaTeX's braces, derived into AUCTeX-vs-plain because IIUC the
> > problem was that they enabled the mode via `latex-mode-hook` which their
> > AUCTeX doesn't run even though the mode describes itself as `latex-mode`.
>
> Indeed. I learned people are often tempted to use `latex-' prefix to
> customize the behavior of AUCTeX. It means that, in addition to
> `latex-mode-hook', `latex-mode-map' and `latex-mode-syntax-table' (and
> their counterparts of plain-tex-mode, texinfo-mode and doctex-mode) are
> potential sources of similar confusion. :-(
>
> Then the idea of turning AUCTeX into minor mode itself does not help.
> Taking into account the discussion between Stefan and Tassilo, possible
> candidates are either:
> (a) In addition to being minor mode, AUCTeX uses lower case
>     `latex-mode-hook', `latex-mode-map' and `latex-mode-syntax-table'.
>     In this case, variable aliases `LaTeX-mode-hook' ->
>     `latex-mode-hook' etc. would also be necessary for compatibility.

The subsequent debate was that Auctex should start using the package name
"auctex-" as a mode prefix as is today supposed to be done.

> (b) AUCTeX abandons the relationship between `LaTeX-mode' and
>     `latex-mode'. I.e. `LaTeX-mode' no longer pretends to be
>     `latex-mode'.

And that indeed, AUCTeX should abandon the use of the original built-in
names for what it is trying to do.  So auctex should be in the names
so everyone can follow the design as is necessary for comprehension,
interpretation, and execution.  Done clearly, rather than continuing
with the current almost impossible way to understand Auctex functionality
rapidly by the average user and developer.

At least the long term plan should be as described and made to happen.

>     In this case,
>       1. Users who have files with -*- latex -*- or
>          %%% mode: latex
>          should explicitly add (defalias 'latex-mode 'LaTeX-mode) in
>          their init files.
>       2. AUCTeX installation process should create tex-site.el which
>          modifies `auto-mode-alist' to associate ".tex" to
>          `TeX-tex-mode'.
>       3. If the site admin sets up site-start.el to load tex-site.el and
>          an individual user of that site wants emacs built-in modes,
>          that user should undo the modification to `auto-mode-alist' by
>          the personal init file.
>
> Regards,
> Ikumi Keita
> #StandWithUkraine #StopWarInUkraine
>
>



reply via email to

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