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


View this message in rfc822 format

From: "Paul D. Nelson" <ultrono <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: ikumi <at> ikumi.que.jp, arash <at> gnu.org, 76615 <at> debbugs.gnu.org
Subject: bug#76615: 14.0.9; error with amsmath style hooks
Date: Wed, 02 Apr 2025 22:29:31 +0200
[Message part 1 (text/plain, inline)]
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>> @@ -389,7 +396,9 @@ reftex-TeX-master-file
>>       (t
>>        ;; Use buffer file name.
>>        (setq master (buffer-file-name))))
>> -    (expand-file-name master)))
>> +    (if reftex--suppress-nonfile-error
>> +        "<none>.tex"
>> +      (expand-file-name master))))
>
> I think TRT would be to return the buffer when in a non-file buffer and
> then to adjust callers accordingly.

I agree that the right approach is to make RefTeX work properly in
non-file buffers.  To explore this, I implemented the approach you
suggested (see the attached patch).  It's a big change that I'm unlikely
to stress-test in my "day job", where for many years I've used a cheap
substitute [1] for RefTeX that I find more efficient for my purposes.
(Any feedback, either on the patch or on how I might better integrate
[1] into the ecosystem, would of course be welcome.)

This bug report arose from a simpler issue: C-x v v C-c C-w in a tex
document (with AUCTeX installed) makes vc activate LaTeX-mode in a
temporary non-file buffer, where AUCTeX style hooks attempt to load
RefTeX (catastrophically).  For this narrow issue, the workaround
provided by Ikumi suffices.

[1] https://github.com/ultronozm/czm-tex-ref.el

[0001-Add-RefTeX-support-for-non-file-buffers.patch (text/x-patch, 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.