GNU bug report logs - #58329
29.0.50; [PATCH] Pass correct environment name to `reftex-label'

Previous Next

Package: emacs;

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

Date: Thu, 6 Oct 2022 09:00:02 UTC

Severity: normal

Tags: fixed, moreinfo, patch

Found in version 29.0.50

Fixed in version 29.1

Done: Arash Esbati <arash <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 58329 in the body.
You can then email your comments to 58329 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#58329; Package emacs. (Thu, 06 Oct 2022 09:00:02 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. (Thu, 06 Oct 2022 09:00:02 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: emacs-bugs <bug-gnu-emacs <at> gnu.org>
Subject: 29.0.50; [PATCH] Pass correct environment name to `reftex-label'
Date: Thu, 06 Oct 2022 10:59:28 +0200
Hi all,

I'd like to install this small change in tex-mode.el:

--8<---------------cut here---------------start------------->8---
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index 6dc2865dd9..bb8ea0d942 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -1557,7 +1557,7 @@ latex-block-body-alist
      '(if (and (boundp 'reftex-mode) reftex-mode) (reftex-label "table"))
      \n _)
     ("figure" nil  > _ \n "\\caption{" > (skeleton-read "Caption: ") "}" > \n
-     '(if (and (boundp 'reftex-mode) reftex-mode) (reftex-label "table"))))
+     '(if (and (boundp 'reftex-mode) reftex-mode) (reftex-label "figure"))))
   "Skeleton element to use for the body of particular environments.
 Every element of the list has the form (NAME . SKEL-ELEM) where NAME is
 the name of the environment and SKEL-ELEM is an element to use in
--8<---------------cut here---------------end--------------->8---

I'm asking because tex-mode isn't my home turf.

Best, Arash




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#58329; Package emacs. (Thu, 06 Oct 2022 12:20:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Arash Esbati <arash <at> gnu.org>
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>, 58329 <at> debbugs.gnu.org
Subject: Re: bug#58329: 29.0.50; [PATCH] Pass correct environment name to
 `reftex-label'
Date: Thu, 06 Oct 2022 14:19:17 +0200
Arash Esbati <arash <at> gnu.org> writes:

> -     '(if (and (boundp 'reftex-mode) reftex-mode) (reftex-label "table"))))
> +     '(if (and (boundp 'reftex-mode) reftex-mode) (reftex-label "figure"))))

Your change look like the right thing to me.  This code was apparently
introduced in:

commit dd166d5fa1712b0dda35859c91d89666c2873471
Author:     Stefan Monnier <monnier <at> iro.umontreal.ca>
AuthorDate: Sun Oct 3 19:53:23 2004 +0000

It looks to me like a cut and paste error -- I've added Stefan to the
CCs; I'm sure he remembers this code.  It's just 18 years ago.

 (defvar latex-block-body-alist
   '(("enumerate" nil '(latex-insert-item) > _)
     ("itemize" nil '(latex-insert-item) > _)
-    ("table" nil "\\caption{" > - "}" > \n _)
-    ("figure" nil  > _ \n "\\caption{" > _ "}" >))
+    ("table" nil "\\caption{" > (skeleton-read "Caption: ") "}" > \n
+     '(if (and (boundp 'reftex-mode) reftex-mode) (reftex-label "table"))
+     \n _)
+    ("figure" nil  > _ \n "\\caption{" > (skeleton-read "Caption: ") "}" > \n
+     '(if (and (boundp 'reftex-mode) reftex-mode) (reftex-label "table"))))





Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 06 Oct 2022 12:20:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#58329; Package emacs. (Thu, 06 Oct 2022 13:42:01 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Arash Esbati <arash <at> gnu.org>, 58329 <at> debbugs.gnu.org
Subject: Re: bug#58329: 29.0.50; [PATCH] Pass correct environment name to
 `reftex-label'
Date: Thu, 06 Oct 2022 09:41:32 -0400
Lars Ingebrigtsen [2022-10-06 14:19:17] wrote:
> Arash Esbati <arash <at> gnu.org> writes:
>
>> -     '(if (and (boundp 'reftex-mode) reftex-mode) (reftex-label "table"))))
>> +     '(if (and (boundp 'reftex-mode) reftex-mode) (reftex-label "figure"))))
>
> Your change look like the right thing to me.  This code was apparently
> introduced in:
>
> commit dd166d5fa1712b0dda35859c91d89666c2873471
> Author:     Stefan Monnier <monnier <at> iro.umontreal.ca>
> AuthorDate: Sun Oct 3 19:53:23 2004 +0000
>
> It looks to me like a cut and paste error -- I've added Stefan to the
> CCs; I'm sure he remembers this code.  It's just 18 years ago.

Oh, so that's what it was.  I've noticed the problem but just lived with
the quirk thinking it was a problem in my own local changes since noone
else complained.
Thanks a lot Arash for fixing it!


        Stefan





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#58329; Package emacs. (Thu, 06 Oct 2022 18:06:01 GMT) Full text and rfc822 format available.

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

From: Arash Esbati <arash <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 58329 <at> debbugs.gnu.org
Subject: Re: bug#58329: 29.0.50; [PATCH] Pass correct environment name to
 `reftex-label'
Date: Thu, 06 Oct 2022 20:01:55 +0200
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

> Oh, so that's what it was.  I've noticed the problem but just lived with
> the quirk thinking it was a problem in my own local changes since noone
> else complained.
> Thanks a lot Arash for fixing it!

You're welcome.  Fixed with 0c65c9dfb3.  Closing.

Best, Arash




Added tag(s) fixed. Request was from Arash Esbati <arash <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 06 Oct 2022 18:06:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 29.1, send any further explanations to 58329 <at> debbugs.gnu.org and Arash Esbati <arash <at> gnu.org> Request was from Arash Esbati <arash <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 06 Oct 2022 18:06:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 04 Nov 2022 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 287 days ago.

Previous Next


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