all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#58329: 29.0.50; [PATCH] Pass correct environment name to `reftex-label'
@ 2022-10-06  8:59 Arash Esbati
  2022-10-06 12:19 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Arash Esbati @ 2022-10-06  8:59 UTC (permalink / raw)
  To: 58329

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





^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#58329: 29.0.50; [PATCH] Pass correct environment name to `reftex-label'
  2022-10-06  8:59 bug#58329: 29.0.50; [PATCH] Pass correct environment name to `reftex-label' Arash Esbati
@ 2022-10-06 12:19 ` Lars Ingebrigtsen
  2022-10-06 13:41   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2022-10-06 12:19 UTC (permalink / raw)
  To: Arash Esbati; +Cc: Stefan Monnier, 58329

Arash Esbati <arash@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@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"))))






^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#58329: 29.0.50; [PATCH] Pass correct environment name to `reftex-label'
  2022-10-06 12:19 ` Lars Ingebrigtsen
@ 2022-10-06 13:41   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-10-06 18:01     ` Arash Esbati
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-10-06 13:41 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Arash Esbati, 58329

Lars Ingebrigtsen [2022-10-06 14:19:17] wrote:
> Arash Esbati <arash@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@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






^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#58329: 29.0.50; [PATCH] Pass correct environment name to `reftex-label'
  2022-10-06 13:41   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-10-06 18:01     ` Arash Esbati
  0 siblings, 0 replies; 4+ messages in thread
From: Arash Esbati @ 2022-10-06 18:01 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Lars Ingebrigtsen, 58329

Stefan Monnier <monnier@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





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-10-06 18:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-06  8:59 bug#58329: 29.0.50; [PATCH] Pass correct environment name to `reftex-label' Arash Esbati
2022-10-06 12:19 ` Lars Ingebrigtsen
2022-10-06 13:41   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-06 18:01     ` Arash Esbati

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.