GNU bug report logs - #76615
14.0.9; error with amsmath style hooks

Previous Next

Package: auctex;

Reported by: "Paul D. Nelson" <ultrono <at> gmail.com>

Date: Thu, 27 Feb 2025 18:31:02 UTC

Severity: normal

Found in version 14.0.9

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


Message #47 received at 76615 <at> debbugs.gnu.org (full text, mbox):

From: Ikumi Keita <ikumi <at> ikumi.que.jp>
To: "Paul D. Nelson" <ultrono <at> gmail.com>
Cc: arash <at> gnu.org, 76615 <at> debbugs.gnu.org
Subject: Re: bug#76615: 14.0.9; error with amsmath style hooks
Date: Wed, 26 Mar 2025 18:15:00 +0900
[Message part 1 (text/plain, inline)]
>>>>> "Paul D. Nelson" <ultrono <at> gmail.com> writes:
> Hi Ikumi, your last patch looks good and seems to work fine for me.
> Thanks, best,  Paul

Thank you, Paul.

Then I'd like someone with write permission of emacs repository to
install the attached patch, please. Then I'll commit the following fix
to the AUCTeX repository.

From b23971c2e37fde9ccfbb8e518c9c0f6f3430a131 Mon Sep 17 00:00:00 2001
From: Ikumi Keita <ikumi <at> ikumi.que.jp>
Date: Wed, 5 Mar 2025 02:37:13 +0900
Subject: [PATCH] Suppress RefTeX error in non-file buffer

* tex.el (TeX-mode-cleanup): In non-file buffer, set up dirty hack for
RefTeX and turn off RefTeX.
---
 tex.el | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/tex.el b/tex.el
index 3d28b2c6..2f650b39 100644
--- a/tex.el
+++ b/tex.el
@@ -102,6 +102,7 @@
 (defvar ispell-parser)                  ; ispell.el
 (defvar compilation-error-regexp-alist) ; compile.el
 (defvar compilation-in-progress)        ; compile.el
+(defvar reftex--suppress-nonfile-error) ; reftex.el
 
 (defconst TeX-mode-comparison-alist
   '((plain-tex-mode . plain-TeX-mode)
@@ -3929,7 +3930,12 @@ Run after mode hooks and file local variables application."
   ;; `find-file-hook'.  This is necessary for `xref-find-references',
   ;; for example. (bug#65912)
   (unless buffer-file-truename
-    (TeX-update-style))
+    (TeX-update-style)
+
+    ;; Suppress RefTeX error in non-file buffer. (Bug#76615)
+    (when (featurep 'reftex)
+      (setq-local reftex--suppress-nonfile-error t)
+      (reftex-mode -1)))
 
   (TeX-set-mode-name))
 
-- 
2.48.1

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW

[diff (text/x-diff, attachment)]

This bug report was last modified 46 days ago.

Previous Next


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