GNU bug report logs - #34979
24.5; indent .tex broken

Previous Next

Package: emacs;

Reported by: Thomas Bucaioni <thomas.bucaioni <at> gmail.com>

Date: Sun, 24 Mar 2019 18:44:01 UTC

Severity: minor

Tags: moreinfo

Found in version 24.5

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Kangas <stefan <at> marxist.se>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: 34979 <at> debbugs.gnu.org, Thomas Bucaioni <thomas.bucaioni <at> gmail.com>
Subject: bug#34979: 24.5; indent .tex broken
Date: Thu, 16 Jan 2020 15:16:11 +0100
"Basil L. Contovounesios" <contovob <at> tcd.ie> writes:

> [Please keep the bug address in the To or Cc header.]
>
> Thomas Bucaioni <thomas.bucaioni <at> gmail.com> 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




This bug report was last modified 4 years and 354 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.