From: Christopher Dimech <dimech@gmx.com>
To: Alessandro Bertulli <alessandro.bertulli96@gmail.com>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>,
wilnerthomas@tutanota.com, help-gnu-emacs@gnu.org
Subject: Re: Rainbow-delimiters highlighting { and } for tex and latex
Date: Thu, 8 Sep 2022 15:25:23 +0200 [thread overview]
Message-ID: <trinity-d681bc21-5972-49ed-995a-84295d6734f5-1662643522979@3c-app-mailcom-bs16> (raw)
In-Reply-To: <87wnae5aj4.fsf@gmail.com>
> Sent: Friday, September 09, 2022 at 12:08 AM
> From: "Alessandro Bertulli" <alessandro.bertulli96@gmail.com>
> To: "Christopher Dimech" <dimech@gmx.com>
> Cc: "Stefan Monnier" <monnier@iro.umontreal.ca>, wilnerthomas@tutanota.com, help-gnu-emacs@gnu.org
> Subject: Re: Rainbow-delimiters highlighting { and } for tex and latex
>
>
> > Have scrutinised this. The problem is the atrocious design around the implementation
> > of tex and latex major modes.
> >
> > This will work
> >
> > (add-to-list 'auto-mode-alist '("\\.sty\\'" . LaTeX-mode))
> > (add-hook 'LaTeX-mode-hook #'rainbow-delimiters-mode)
> >
> > But this will not
> >
> > (add-to-list 'auto-mode-alist '("\\.sty\\'" . latex-mode))
> > (add-hook 'latex-mode-hook #'rainbow-delimiters-mode)
>
> I don't want to add more fuel, but just to clear a bit: latex-mode and
> tex-mode are the modes set up by vanilla Emacs. AUCTeX, which is an
> awesome package to provide a quick yet powerful LaTeX IDE in Emacs,
> provides LaTeX-mode and TeX-mode (note the capitalization). Is it
> confusing? Unfortunately, yes it is.
The plan would be to integrate the functionality of AUCTeX into tex-mode
and latex-mode, even though there can be a core AUCTeX file. The problems
associated with the separate functionality has been discussed with Carsten
Dominik about his "cdlatex" rapid tools. There is agreement on the need
for thinking a new scheme through.
> > Work needs to be done so that there is just "tex-mode" and "latex-mode",
> > and getting rid with all this TeX-mode", "LaTeX-mode", TeX-mode-hook,
> > LaTeX-mode-hook, nonsense.
>
> I agree, but I guess the point is to not break compatibility with old
> codebases. I wonder if defining some aliases would work tho.
I would say that users expect emacs to honour the contents of auto-mode-alist.
> > Tools are supposed to work well together but this is not the case with
> > "tex-related" modes.
>
> Actually they do, once corrected this thing. Probably you have
> auto-mode-alist set up so that .tex/.sty files are opened in LaTeX-mode,
> so latex-mode-hook is never actually run. Is this your problem, maybe?
> Anyway, I'm glad you got it work.
>
> --
> Alessandro Bertulli
There is a solution but is very time consuming to realise what is happening.
Especially for users who rely on many tools and packages.
next prev parent reply other threads:[~2022-09-08 13:25 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-07 11:07 Rainbow-delimiters highlighting { and } for tex and latex wilnerthomas--- via Users list for the GNU Emacs text editor
2022-09-07 13:01 ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-09-07 13:10 ` wilnerthomas--- via Users list for the GNU Emacs text editor
2022-09-07 13:14 ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-09-07 13:23 ` wilnerthomas--- via Users list for the GNU Emacs text editor
2022-09-07 13:34 ` Stefan Monnier
2022-09-07 19:29 ` Christopher Dimech
2022-09-08 4:13 ` tomas
2022-09-08 10:13 ` Christopher Dimech
2022-09-08 12:08 ` Alessandro Bertulli
2022-09-08 13:25 ` Christopher Dimech [this message]
2022-09-08 13:58 ` Alessandro Bertulli
2022-09-08 15:02 ` Christopher Dimech
2022-09-08 15:04 ` Alessandro Bertulli
2022-09-09 8:41 ` Arash Esbati
2022-09-09 12:33 ` Christopher Dimech
2022-09-09 19:36 ` Arash Esbati
2022-09-09 20:13 ` Christopher Dimech
2022-09-09 20:45 ` Christopher Dimech
[not found] ` <jwvleqvmhqj.fsf-monnier+emacs@gnu.org-NBNA5jg----2>
2022-09-07 15:03 ` wilnerthomas--- via Users list for the GNU Emacs text editor
2022-09-07 15:16 ` tomas
2022-09-07 15:29 ` wilnerthomas--- via Users list for the GNU Emacs text editor
2022-09-07 15:59 ` tomas
2022-09-07 16:43 ` Stefan Monnier
[not found] ` <jwvczc7b0jf.fsf-monnier+emacs@gnu.org-NBNqAf0----2>
2022-09-08 10:35 ` wilnerthomas--- via Users list for the GNU Emacs text editor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=trinity-d681bc21-5972-49ed-995a-84295d6734f5-1662643522979@3c-app-mailcom-bs16 \
--to=dimech@gmx.com \
--cc=alessandro.bertulli96@gmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=wilnerthomas@tutanota.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).