Subject: bug#73302: closed (Re: bug#73302: TeX-find-closing-brace and verbatim macros)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 01 Oct 2024 22:03:03 +0000

Your bug report

#73302: TeX-find-closing-brace and verbatim macros

which was filed against the auctex package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
73302: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=73302
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#73302: TeX-find-closing-brace and verbatim macros
From: Arash Esbati <[email-masked]>
To: Paul Nelson <[email-masked]>
Cc: Ikumi Keita <[email-masked]>, [email-masked]
Date: Wed, 02 Oct 2024 00:02:11 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi Paul,

Paul Nelson <[email-masked]> writes:

> Indeed, the motivation for the bug fix that started this thread was
> that I've been polishing https://github.com/ultronozm/czm-tex-fold.el
> lately, with the aim of sharing it here and pushing it in some form to
> AUCTeX or ELPA (ideally, from my POV, the package would "cease to
> exist").

Yes, pushing the maintainance to others is always a good strategy ;-)

> Besides verbatim environments, the package adds folding support for
> quotes, dashes and begin/end environments (and maybe a couple more
> opinionated defaults of lesser importance).
>
> The folding for verbatim environments that we just discussed could be
> incorporated by something like the attached patch.

Many thanks for the patch, I installed that change (incl. the change
from your next mail).

> The other features could be discussed separately.  Any thoughts would
> be appreciated.

I suggest you prepare a patch for every feature you want to move into
AUCTeX and file a bug report, then we can discuss and install it.  For
now, I'm closing this report.

Best, Arash

Subject: TeX-find-closing-brace and verbatim macros
From: Paul Nelson <[email-masked]>
To: [email-masked]
Date: Mon, 16 Sep 2024 18:12:10 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello,

Steps to reproduce:
1. Create a TeX file with a verbatim macro, e.g., \[email-masked]},
or anything in (LaTeX-verbatim-macros-with-braces).
2. Put the cursor on the first character inside the braces.
3. M-: (TeX-find-closing-brace)

This should return position after closing brace, but instead returns nil.

This bug affects the folding of verbatim macros, through a chain of
function calls from TeX-fold-hide-item to TeX-find-closing-brace.

The issue is similar to one addressed by up-list in lisp.el - the key
point is to recover gracefully from the failed call to (scan-lists
(point) 1 1), rather than to give up altogether.  A similar fix might
be possible, but I thought I'd raise the issue here first.

Thanks, best,

Paul