GNU bug report logs - #34629
27.0.50; Wrong parsing of key-val labels

Previous Next

Package: emacs;

Reported by: Arash Esbati <arash <at> gnu.org>

Date: Sat, 23 Feb 2019 13:20:01 UTC

Severity: normal

Found in version 27.0.50

Done: Tassilo Horn <tsdh <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 34629 in the body.
You can then email your comments to 34629 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#34629; Package emacs. (Sat, 23 Feb 2019 13:20:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Arash Esbati <arash <at> gnu.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 23 Feb 2019 13:20:01 GMT) Full text and rfc822 format available.

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

From: Arash Esbati <arash <at> gnu.org>
To: bug-gnu-emacs <at> gnu.org
Cc: auctex-devel <auctex-devel <at> gnu.org>
Subject: 27.0.50; Wrong parsing of key-val labels
Date: Sat, 23 Feb 2019 14:17:54 +0100
[Message part 1 (text/plain, inline)]
Hi all,

Please consider the following LaTeX code in a buffer where RefTeX is
enabled:

--8<---------------cut here---------------start------------->8---
\documentclass{article}
\usepackage{listings}
\begin{document}

\begin{lstlisting}[
caption = Some caption ,
label   = lst:1        %
]
foo
\end{lstlisting}

\begin{lstlisting}[
caption = {[Short caption]Long caption},
label   = lst:2          
]
bar
\end{lstlisting}

\begin{lstlisting}[
language  = {[LaTeX]TeX}                           ,
frame     = single                                 ,
caption   = {[Short caption]\textit{L\textbf{o}ng} caption} ,
label     = lst:3     ]
foobar
\end{lstlisting}

\end{document}
--8<---------------cut here---------------end--------------->8---

When hitting `C-u C-c )' in order to add a \ref, RefTeX fails to see the
last 2 labels.  For the first one, it inserts

\ref{lst:1        %
}

The is due to the second regexp in `reftex-label-regexps'.  Please find
attached a patch fixing this issue.  Any comments welcome.

Best, Arash

[0001-Improve-matching-of-key-val-labels.patch (text/x-patch, attachment)]

Reply sent to Tassilo Horn <tsdh <at> gnu.org>:
You have taken responsibility. (Wed, 27 Feb 2019 17:27:01 GMT) Full text and rfc822 format available.

Notification sent to Arash Esbati <arash <at> gnu.org>:
bug acknowledged by developer. (Wed, 27 Feb 2019 17:27:02 GMT) Full text and rfc822 format available.

Message #10 received at 34629-close <at> debbugs.gnu.org (full text, mbox):

From: Tassilo Horn <tsdh <at> gnu.org>
To: Arash Esbati <arash <at> gnu.org>
Cc: auctex-devel <auctex-devel <at> gnu.org>, 34629-close <at> debbugs.gnu.org
Subject: Re: bug#34629: 27.0.50; Wrong parsing of key-val labels
Date: Wed, 27 Feb 2019 18:26:30 +0100
Arash Esbati <arash <at> gnu.org> writes:

Hi Arash,

> The is due to the second regexp in `reftex-label-regexps'.  Please
> find attached a patch fixing this issue.  Any comments welcome.

Pushed to emacs master.  Thanks a lot!

Bye,
Tassilo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34629; Package emacs. (Fri, 08 Mar 2019 21:14:02 GMT) Full text and rfc822 format available.

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

From: Arash Esbati <arash <at> gnu.org>
To: Tassilo Horn <tsdh <at> gnu.org>
Cc: auctex-devel <auctex-devel <at> gnu.org>, 34629 <at> debbugs.gnu.org
Subject: Re: bug#34629: 27.0.50; Wrong parsing of key-val labels
Date: Fri, 08 Mar 2019 22:12:23 +0100
[Message part 1 (text/plain, inline)]
Tassilo Horn <tsdh <at> gnu.org> writes:

> Arash Esbati <arash <at> gnu.org> writes:
>
>> The is due to the second regexp in `reftex-label-regexps'.  Please
>> find attached a patch fixing this issue.  Any comments welcome.
>
> Pushed to emacs master.  Thanks a lot!

Hi Tassilo,

many thanks for installing the patch.  Unfortunately, my last patch
wasn't good enough since I forgot that the ctable package provides a
macro and not an environment.  The patch attached fixes this issue.
This patch hardcodes the search to the environments/macro provided by
the packages "listings", "breqn" and "ctable".  I think this change is
acceptable; any other envs/macros can be added easily by the user and/or
AUCTeX styles.

Best, Arash

[0001-Improve-matching-of-key-val-labels-yet-more-bug-3462.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34629; Package emacs. (Sat, 09 Mar 2019 06:51:02 GMT) Full text and rfc822 format available.

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

From: Tassilo Horn <tsdh <at> gnu.org>
To: Arash Esbati <arash <at> gnu.org>
Cc: auctex-devel <auctex-devel <at> gnu.org>, 34629 <at> debbugs.gnu.org
Subject: Re: bug#34629: 27.0.50; Wrong parsing of key-val labels
Date: Sat, 09 Mar 2019 07:50:07 +0100
Arash Esbati <arash <at> gnu.org> writes:

Hi Arash,

>> Pushed to emacs master.  Thanks a lot!
>
> Hi Tassilo,
>
> many thanks for installing the patch.  Unfortunately, my last patch
> wasn't good enough since I forgot that the ctable package provides a
> macro and not an environment.  The patch attached fixes this issue.
> This patch hardcodes the search to the environments/macro provided by
> the packages "listings", "breqn" and "ctable".  I think this change is
> acceptable; any other envs/macros can be added easily by the user
> and/or AUCTeX styles.

Pushed!  Thanks a lot!

        Tassilo




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 06 Apr 2019 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 12 days ago.

Previous Next


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