GNU bug report logs - #78693
14.0.9; Folding of math macros with a function spec is broken

Previous Next

Package: auctex;

Reported by: Rahguzar <rahguzar <at> mailbox.org>

Date: Wed, 4 Jun 2025 08:49:03 UTC

Severity: normal

Merged with 78696, 78698

Found in version 14.0.9

Full log


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

From: Rahguzar <rahguzar <at> mailbox.org>
To: "Paul D. Nelson" <ultrono <at> gmail.com>
Cc: 78693 <at> debbugs.gnu.org
Subject: Re: 14.0.9; Folding of math macros with a function spec is broken
Date: Sun, 22 Jun 2025 12:14:43 +0500
[Message part 1 (text/plain, inline)]
Hi Paul,

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

> Hi Raghuzar,
>
>> I have tested the patch and resolve the original issue. I haven't tested
>> the new functionality using the SPEC.
>
> Thanks.
>
>> One question about it: One problem I have had is that, if I have
>> something like
>>
>> \begin{align}
>>   [\hat{X},\hat{P}] = i\hbar
>> \end{align}
>>
>> the commutator gets folded as an optional argument to the \begin.
>> It is possible to not have this effect with new machinery without
>> specifying \begin as not taking any optional arguments?
>
> Could you please share your tex folding config, or better, the part
> relevant for folding \begin{align}?

It is this:

(setq TeX-fold-macro-spec-list
      `(("⬖ {1}" ("begin"))
        ("⬗ {1}" ("end"))))

and I have included a test.tex file which you can use to see the effect.

>> I have only seen optional arguments before mandatory ones but I don't
>> know if that can be relied upon in general.
>
> What about "\begin{theorem}[My Favorite Theorem]"?
>
> Paul

In my corner (theoretical physics) we don't do much theorem proving :)
I have used environments for theorems but very rarely. I expected optional
arguments after mandatory ones to be possible. For the example you give
my folding would be very annoying.

Rahguzar

[test.tex (application/x-tex, attachment)]

This bug report was last modified 1 day ago.

Previous Next


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