GNU bug report logs - #66771
[PATCH] Throw out fold spec after a single failure

Previous Next

Package: auctex;

Reported by: Tony Zorman <soliditsallgood <at> mailbox.org>

Date: Fri, 27 Oct 2023 06:37:02 UTC

Severity: normal

Tags: patch

Done: Ikumi Keita <ikumi <at> ikumi.que.jp>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ikumi Keita <ikumi <at> ikumi.que.jp>
To: Tony Zorman <soliditsallgood <at> mailbox.org>
Cc: 66771 <at> debbugs.gnu.org
Subject: bug#66771: [PATCH] Throw out fold spec after a single failure
Date: Wed, 08 Nov 2023 18:43:59 +0900
Hi Tony, sorry for late response.

>>>>> Tony Zorman via bug-auctex via Bug reporting list for AUCTeX <bug-auctex <at> gnu.org> writes:
> Right now, TeX-fold-expand-spec does not abort its expansion of the
> current spec if *any* of the expansions succeeded. This can lead to
> some unexpected behaviour. For example, given

>     (setopt TeX-fold-math-spec-list
>             '(("[1] of {1}||{1}" ("cite"))))

> expanding `\cite{this}' would result in the overlay displaying
> `… of this' instead of just `this', because one of the arguments (the
> mandatory one) succeeded. This is probably not what the user intended.
> Instead, in order for the spec to be chosen, *all* arguments should
> succeed.

> The attached patch does this.

Thank you for proposal. I think that AUCTeX can accept it and it
requires copyright assignment. Have you signed FSF copyright assignment
form before? If you haven't and want to have your proposal incorporated
into AUCTeX, please follow this instruction:
https://git.savannah.gnu.org/cgit/gnulib.git/tree/doc/Copyright/request-assign.future

> One thing that seems related is that the function claims that it also
> matches arguments of the form `(<number>)', but the regular expression
> that's used

>     "\\([[{<]\\)\\([1-9]\\)\\([]}>]\\)"

> does not contain any matches for simple parentheses. I don't know
> whether I'm missing something here, so I didn't change this.

It seems to me that it's just a bug. I think that tex-fold.el should be
corrected to include "(" and ")" in the regexp first, and your proposed
change should follow it. I'll do the former soon.

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine




This bug report was last modified 1 year and 158 days ago.

Previous Next


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