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 #32 received at 76615 <at> debbugs.gnu.org (full text, mbox):

From: "Paul D. Nelson" <ultrono <at> gmail.com>
To: Ikumi Keita <ikumi <at> ikumi.que.jp>
Cc: arash <at> gnu.org, 76615 <at> debbugs.gnu.org
Subject: Re: bug#76615: 14.0.9; error with amsmath style hooks
Date: Fri, 14 Mar 2025 08:09:18 -0700
[Message part 1 (text/plain, inline)]
Hi Ikumi,

> Is `reftex-TeX-master-file' the only source of RefTeX non-file buffer
> difficulties? If so, I expect there is a possibility that we can amend
> it so that RefTeX would not stumble in non-file buffer. For example,
> `TeX-master-file' returns "<none>.tex" if it can't find a sensible
> master file. What if we implement similar fallback for
> `reftex-TeX-master-file'?

Patching reftex in the suggested way does seem to alleviate the noted
issue with style hooks.  I can only imagine it breaks other things, but
given that non-file buffers are already not supported in reftex, maybe
that's OK?

Paul


[Message part 2 (text/x-patch, inline)]
diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el
index 8088ab391f5..2fac7982848 100644
--- a/lisp/textmodes/reftex.el
+++ b/lisp/textmodes/reftex.el
@@ -389,7 +389,9 @@ reftex-TeX-master-file
      (t
       ;; Use buffer file name.
       (setq master (buffer-file-name))))
-    (expand-file-name master)))
+    (if master
+        (expand-file-name master)
+      "<none>.tex")))
 
 (defun reftex-is-multi ()
   ;; Tell if this is a multifile document.  When not sure, say yes.

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.