From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Heime via Users list for the GNU Emacs text editor Newsgroups: gmane.emacs.help Subject: Re: Mode hooks for latex and tex files Date: Mon, 02 Dec 2024 16:15:23 +0000 Message-ID: References: Reply-To: Heime Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34279"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Arash Esbati Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 02 17:16:17 2024 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tI95t-0008lg-3W for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 02 Dec 2024 17:16:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tI95E-0000eR-MH; Mon, 02 Dec 2024 11:15:36 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tI95C-0000dx-3H for help-gnu-emacs@gnu.org; Mon, 02 Dec 2024 11:15:35 -0500 Original-Received: from mail-10697.protonmail.ch ([79.135.106.97]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tI959-000403-3L for help-gnu-emacs@gnu.org; Mon, 02 Dec 2024 11:15:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1733156127; x=1733415327; bh=w4zIWxHpEmBuYafUIPIqlBXhPGjsRbhohBxN9qb0qyo=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=V9cu2LFoJEKTqaFOIH+om3naoXQPA7hirwfcMG5FgIUK5yYRJvHaPHDgF0Fctu9su 2Kvq0Uju+1yqVxQwDFCkWVLmCygVlGamp/0NHG4UCHX2ilSWzBn8fc4G6NS96p5csS gJDlZ7oeUYpIlTwb59KCo+a1d9bpp0uG3UeixZ9EmRrmxAiZkg/Nwt2RRbMbroW1Di QKkVZfd/NYHPtJqWq/gyFcjy+yOIyTue0itkYeYOiG6qw3CbJUXABqfI4cXu3lezsJ cVHwhPfW7Woq0C1JS5GHLTH2yR33lQwHZJKK9F/LXek5HRdNjadiQYXrEkhUa4aSgQ DMRXJ+33OnO8A== In-Reply-To: Feedback-ID: 57735886:user:proton X-Pm-Message-ID: b8af4922f0ae4750a4a0063c703b33b954822f57 Received-SPF: pass client-ip=79.135.106.97; envelope-from=heimeborgia@protonmail.com; helo=mail-10697.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:148495 Archived-At: Sent with Proton Mail secure email. On Tuesday, December 3rd, 2024 at 3:58 AM, Heime wrote: > On Tuesday, December 3rd, 2024 at 1:17 AM, Arash Esbati arash@gnu.org wro= te: >=20 > > Heime via Users list for the GNU Emacs text editor help-gnu-emacs@gnu.o= rg writes: > >=20 > > > What are the mode hooks for latex and tex files? > >=20 > > It depends. > >=20 > > > Using latex and tex is currently very non-intuitive, with things > > > like LaTex-mode, TeX-mode. This mixed capitalisation is all too > > > confusing because ordinary users see only a latex or tex configuratio= n > > > for their modes, rather than the nuances of capitalisation changes. > >=20 > > The only point you have to consider is that there are 2 major modes for > > editing plain-tex and latex files: > >=20 > > =E2=80=A2 The modes bundled with Emacs (in tex-mode.el, do > > 'M-x locate-library RET tex-mode RET') and > >=20 > > =E2=80=A2 the modes provided by AUCTeX (a package you must install from= ELPA > > first). > >=20 > > If you're using the former, use `plain-tex-mode-hook' or` latex-mode-ho= ok', and with the latter, set `plain-TeX-mode-hook' or` LaTeX-mode-hook'. > >=20 > > `tex-mode-hook' and` TeX-mode-hook' are sort of meta-modes and not > > intended for end users, so don't set them. > >=20 > > Best, Arash >=20 >=20 > AUCTeX introduces unnecessary complexity by deviating from standard > naming conventions for tool-related modes. Instead of adhering to the > typical package-prefixed predicate style (e.g., auctex-tex-mode and > auctex-latex-mode), it opts for inconsistent and unintuitive names. >=20 > The use of plain-tex-mode instead of a unified tex-mode (as seen with > latex-mode) adds further redundancy. Meta-modes not intended for > direct user interaction should avoid using intuitive and general names > like tex-mode, reserving such names for user-facing > functionality. This inconsistency is unique to AUCTeX; other language > tools, such as for C, avoid analogous confusion=E2=80=94there is no equiv= alent > plain-c-mode. I am also interested in the made hooks. Would the built-in be plain-tex-mo= de-hook and latex-mode-hook ? Is there also tex-mode-hook ?