unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: "Basil L. Contovounesios" <contovob@tcd.ie>
Cc: 34979@debbugs.gnu.org, Thomas Bucaioni <thomas.bucaioni@gmail.com>
Subject: bug#34979: 24.5; indent .tex broken
Date: Thu, 16 Jan 2020 15:16:11 +0100	[thread overview]
Message-ID: <874kwvxz9w.fsf@marxist.se> (raw)
In-Reply-To: <87v9zqhif7.fsf@tcd.ie> (Basil L. Contovounesios's message of "Sat, 06 Apr 2019 23:34:36 +0100")

"Basil L. Contovounesios" <contovob@tcd.ie> writes:

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





  parent reply	other threads:[~2020-01-16 14:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-24 17:04 bug#34979: 24.5; indent .tex broken Thomas Bucaioni
2019-03-27 12:27 ` Glenn Morris
2019-03-30 18:31   ` Thomas Bucaioni
2019-03-31 10:16     ` Thomas Bucaioni
2019-03-31 11:43       ` Thomas Bucaioni
2019-03-31 13:02         ` Thomas Bucaioni
2019-04-05 11:36       ` Basil L. Contovounesios
2019-04-05 11:36     ` Basil L. Contovounesios
     [not found]       ` <CAKLB5NS7HLz2sP=rL+6Np7GP9=XiHhoBKokZx1Zf7QYs5wuxWw@mail.gmail.com>
2019-04-06 22:34         ` Basil L. Contovounesios
2019-04-06 23:17           ` Thomas Bucaioni
2020-01-16 14:16           ` Stefan Kangas [this message]
2020-08-04 15:53             ` Stefan Kangas

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=874kwvxz9w.fsf@marxist.se \
    --to=stefan@marxist.se \
    --cc=34979@debbugs.gnu.org \
    --cc=contovob@tcd.ie \
    --cc=thomas.bucaioni@gmail.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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).