GNU logs - #78698, boring messages


Message sent to bug-auctex@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#78698: 14.0.9; Folding of math macros with a function spec is broken
Resent-From: Rahguzar <rahguzar@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-auctex@HIDDEN
Resent-Date: Thu, 05 Jun 2025 03:55:01 +0000
Resent-Message-ID: <handler.78698.B.174909569416489 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 78698
X-GNU-PR-Package: auctex
X-GNU-PR-Keywords: 
To: "Paul D. Nelson" <ultrono@HIDDEN>
Cc: 78698 <at> debbugs.gnu.org
X-Debbugs-Original-Cc: bug-auctex@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.174909569416489
          (code B ref -1); Thu, 05 Jun 2025 03:55:01 +0000
Received: (at submit) by debbugs.gnu.org; 5 Jun 2025 03:54:54 +0000
Received: from localhost ([127.0.0.1]:56749 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1uN1gq-0004Hn-V4
	for submit <at> debbugs.gnu.org; Wed, 04 Jun 2025 23:54:54 -0400
Received: from lists.gnu.org ([2001:470:142::17]:60572)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <rahguzar@HIDDEN>)
 id 1uN1gn-0004H0-Uq
 for submit <at> debbugs.gnu.org; Wed, 04 Jun 2025 23:54:50 -0400
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 <rahguzar@HIDDEN>)
 id 1uN1gh-0000zm-9F
 for bug-auctex@HIDDEN; Wed, 04 Jun 2025 23:54:43 -0400
Received: from mout-p-101.mailbox.org ([2001:67c:2050:0:465::101])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256)
 (Exim 4.90_1) (envelope-from <rahguzar@HIDDEN>)
 id 1uN1gd-0004KO-7L
 for bug-auctex@HIDDEN; Wed, 04 Jun 2025 23:54:40 -0400
Received: from smtp102.mailbox.org (smtp102.mailbox.org
 [IPv6:2001:67c:2050:b231:465::102])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4bCVvB07f4z9ssx;
 Thu,  5 Jun 2025 05:54:30 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org;
 s=mail20150812; t=1749095670;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=zlJc5R/LRAnlC53mv1ymn9YWgmNHxa2CTER3lwGv2HU=;
 b=qH9Y63QAY7SCfZ15cqlWY1MOT+QH2xho8PqJBEqy6je7WAXG8k7U7ObUpN5bsFzhngdUj6
 f5MmUCpxXqcCqUMdYNeAqGVQLSf4Vq8haGTzKjuB2K8uC62+daIs4gWBr/UkCKWIqKos+E
 0b6C4EknMEuptkBp2aCooQnNsp0rVhDTFiaaVx+h3ufe5+/w1NNPo/GvqFICuWbXCZH6NP
 SxChvTniWWhkMZXj7gHHVLnIRGqL/58wmiytiLLJLnmJ2ZXdrZ7ACQyRgzVK5z9y+IuJ4s
 GnDzFN4yNuTsXeo4nkXhSs3A+rZbxRP0ekkZlVJRQ2s2m5HVzmDPMaJI3e+Tjw==
From: Rahguzar <rahguzar@HIDDEN>
In-Reply-To: <uxsg7tqzzzulcx.fsf@HIDDEN> (Paul D. Nelson's message of "Thu, 
 05 Jun 2025 01:40:14 +0200")
References: <uxsg7tqzzzulcx.fsf@HIDDEN>
Date: Thu, 05 Jun 2025 08:54:26 +0500
Message-ID: <877c1qlu6l.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-MBO-RS-META: sacin878f3kpt9mrck9h6m1m8scuih9w
X-MBO-RS-ID: f0c276007820de0e3ba
Received-SPF: pass client-ip=2001:67c:2050:0:465::101;
 envelope-from=rahguzar@HIDDEN; helo=mout-p-101.mailbox.org
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 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,
 RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

"Paul D. Nelson" <ultrono@HIDDEN> writes:

> Hi Rahguzar,
>
>>>> (setq TeX-fold-math-spec-list `((,(lambda (text) (propertize text 'face '(underline))) ("underline"))))
>>>
>>> Is there a reason to prefer this vs. the same with
>>> TeX-fold-macro-spec-list in place of TeX-fold-math-spec-list?
>>
>> The reason for why it is in TeX-fold-math-spec-list is that when I
>> started with Emacs I stole it from Tecosaur's config. There are quite a
>> few function specs in my TeX-fold-math-spec-list e.g. for sqrt, frac,
>> mathcal, mathfrak and mathbb etc and most of them are relevant only for
>> math. Should they be moved to TeX-fold-macro-spec-list?
>
> I think one can use TeX-fold-macro-spec-list for all of these.  In
> particular, your underline example works fine there for me.
>
> It's not clear to me from those what exactly are the intended purposes
> of the various spec lists (macro/env/math).  My impression from the
> built-in examples was that the math list is for macros like "alpha" that
> accept no arguments.

Yes, it would be good to make this clear in the documentation.

> The motivation for the offending patch was to make it so folding "\in
> [0, 1]" doesn't hide the "[0, 1]" as if it were an optional arg.  To
> give a more robust fix that works with your code sample, we would need a
> more robust way to detect when a macro is not intended to have any
> (optional) arguments.  The implemented approach was to just assume that
> all the "math" macros accept no arguments.  Do you or does anyone have
> other suggestions?

I have also seen the problem you are encountering so it is good to
have a fix for that.

I think to preserve breakage and preserve backward compatibility it
would be better to either:

1) Assume that there is no white-space between the macro name and the
brackets enclosing the arguments. This is probably not how TeX syntax
works but I think (not too sure about this) it is the usual style. This
behavior can be controlled by a custom variable.

2) Since the problem is with optional arguments we can allow { after the
macro name but not [.

3) Another option can be to introduce a new spec alist for macros
without optional args.

> Paul

Rahguzar




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Rahguzar <rahguzar@HIDDEN>
Subject: bug#78698: Acknowledgement (14.0.9; Folding of math macros with a
 function spec is broken)
Message-ID: <handler.78698.B.174909569416489.ack <at> debbugs.gnu.org>
References: <877c1qlu6l.fsf@HIDDEN>
X-Gnu-PR-Message: ack 78698
X-Gnu-PR-Package: auctex
Reply-To: 78698 <at> debbugs.gnu.org
Date: Thu, 05 Jun 2025 03:55:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-auctex@HIDDEN

If you wish to submit further information on this problem, please
send it to 78698 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
78698: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D78698
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message received at control <at> debbugs.gnu.org:


Received: (at control) by debbugs.gnu.org; 11 Jun 2025 07:33:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 11 03:33:16 2025
Received: from localhost ([127.0.0.1]:46098 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1uPFxU-0005ss-F1
	for submit <at> debbugs.gnu.org; Wed, 11 Jun 2025 03:33:16 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:50748)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <arash@HIDDEN>)
 id 1uPFxC-0005r6-EA; Wed, 11 Jun 2025 03:32:59 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <arash@HIDDEN>)
 id 1uPFx5-0003Ly-GT; Wed, 11 Jun 2025 03:32:51 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To:
 From; bh=NysgRVepcoa4om6ZRH31MxnH0ZdI8rt6BaILKhV3idM=; b=eQ0B1IC3y/Rw+zl8WN+G
 32R8aJbyodcIp/fG4eWBWaMy2o4wucASCsEJHYpf+FT9HnX5A/d250nTgzOxB+RsrrEjlJ2+InV7+
 MSJnsqhIj35/S3PAZvqxT6rk7pzgyuJxZUTtmX1+JDdjb6R45Tpc9KL9KWh9bQyGY7fUfbrmTmqVu
 taNNBRYiNkzBHrbPzn5VLS9Bw7R8LHmOMi4wXa7D1R0GGkaNZckWTQdbZlXH675ODGwtr8r5CAH1s
 7AJnuWfOZ+Hv6jpZCfmv87csYGC34IOUeKmHvemhtLjZEt+4bnPC3WtlK98SQD7YE9XLiBzKlOetw
 XkPqZzmQwrRDSg==;
From: Arash Esbati <arash@HIDDEN>
To: Rahguzar via bug-auctex via Bug reporting list for AUCTeX
 <bug-auctex@HIDDEN>
Subject: Re: bug#78693: 14.0.9; Folding of math macros with a function spec
 is broken
In-Reply-To: <87bjr3nb8j.fsf@HIDDEN>
References: <87bjr3nb8j.fsf@HIDDEN>
Date: Wed, 11 Jun 2025 09:32:47 +0200
Message-ID: <m2a56eag2o.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: control
Cc: 78693 <at> debbugs.gnu.org, Rahguzar <rahguzar@HIDDEN>, ultrono@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

forcemerge 78693 78696 78698
thanks

Rahguzar via bug-auctex via Bug reporting list for AUCTeX <bug-auctex@HIDDEN> writes:

> Dear AucTeX maintainers,
>
> The commits
>
> d0a57d8d Fix math macro folding to not consume subsequent brackets
> 33f9eb07 Fix TeX macro end detection in some edge cases
>
> break the folding of math macros with a function spec.

Gents,

somehow 3 bug reports where opened for this report which I'm merging
now.  Please try to avoid this in future.  TIA.

Best, Arash





Last modified: Wed, 11 Jun 2025 07:45:01 UTC

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