GNU bug report logs - #78587
[PATCH] TeX-find-macro-end

Previous Next

Package: auctex;

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

Date: Sun, 25 May 2025 15:15:02 UTC

Severity: normal

Tags: patch

Done: Arash Esbati <arash <at> gnu.org>

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Arash Esbati <arash <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#78587: closed ([PATCH] TeX-find-macro-end)
Date: Fri, 30 May 2025 15:07:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Fri, 30 May 2025 17:06:30 +0200
with message-id <m234cmgmtl.fsf <at> macmutant.fritz.box>
and subject line Re: bug#78587: [PATCH] TeX-find-macro-end
has caused the debbugs.gnu.org bug report #78587,
regarding [PATCH] TeX-find-macro-end
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
78587: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=78587
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: "Paul D. Nelson" <ultrono <at> gmail.com>
To: bug-auctex <at> gnu.org
Subject: [PATCH] TeX-find-macro-end
Date: Sun, 25 May 2025 17:14:44 +0200
[Message part 3 (text/plain, inline)]
Hi all,

I noticed that TeX-find-macro-end doesn't work as expected way on, e.g.,

  \begin{enumerate}[a)]

The issue arose organically when folding such macros.

To see the basic issue, evaluate the following in scratch:

--8<---------------cut here---------------start------------->8---
(mapcar
 (lambda (str)
   (with-temp-buffer
     (LaTeX-mode)
     (insert str)
     (char-to-string (char-before (TeX-find-macro-end-helper (point-min))))))
 '("\begin{enumerate}[a]"
   "\begin{enumerate}[(a)]"
   "\begin{enumerate}[a)]"))
--8<---------------cut here---------------end--------------->8---

This returns ("]" "]" ")") but should return ("]" "]" "]").

The attached patch seems to address the issue by using a stripped syntax
table, which seems like a standard approach in tex.el.  Any feedback
would be welcome.

Paul

[0001-Fix-TeX-macro-end-detection-in-some-edge-cases.patch (text/x-patch, attachment)]
[Message part 5 (message/rfc822, inline)]
From: Arash Esbati <arash <at> gnu.org>
To: "Paul D. Nelson" <ultrono <at> gmail.com>
Cc: 78587-done <at> debbugs.gnu.org
Subject: Re: bug#78587: [PATCH] TeX-find-macro-end
Date: Fri, 30 May 2025 17:06:30 +0200
Hi Paul,

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

> I think the answer to both of your questions is "yes".  Thanks for your
> feedback and best,

I massaged that change a little and installed it.  Many thanks for the
change set, closing.

Best, Arash


This bug report was last modified 15 days ago.

Previous Next


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