bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#34979: 24.5; indent .tex broken


From: Stefan Kangas
Subject: bug#34979: 24.5; indent .tex broken
Date: Thu, 16 Jan 2020 15:16:11 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

"Basil L. Contovounesios" <address@hidden> writes:

> [Please keep the bug address in the To or Cc header.]
>
> Thomas Bucaioni <address@hidden> writes:
>
>> As the file was a .tex, I expected Emacs to switch to mark-up mode as
>> it does for .c files.
>
> Sorry, I don't understand what you mean, can you please elaborate?
> Which mark-up mode are you referring to?  How does it relate to *.c
> files?
>
> By default, Emacs opens *.tex files in tex-mode (see auto-mode-alist).
> This is a generic parent mode which tries to guess which specialised
> submode to enable (see tex-guess-mode).  Evaluating the following, for
> example, should place you in a latex-mode buffer:
>
>   (find-file (make-temp-file "my-" nil ".tex"))
>
> If tex-guess-mode guesses incorrectly, there are several other ways to
> specify the desired major mode, e.g. via an auto-mode-alist entry,
> file/directory variable, hook, or otherwise (including the obvious
> M-x latex-mode RET).

So if I read this discussion correctly, the problem is, quoting SE:

    The problem is likely that your other files use tex-plain-mode
    instead of latex-mode. The .tex extension is used for both, so
    Emacs tries to guess, and it tends to err on the side of
    tex-plain-mode.

    You can add a -*- mode: latex -*- somewhere on the first line of
    your files to avoid the problem.

Is this something we would like to change, or is this working as
expected and therefore notabug?

Best regards,
Stefan Kangas





reply via email to

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