bug-auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#37861: bug in reftex: Change label and refs


From: Tassilo Horn
Subject: bug#37861: bug in reftex: Change label and refs
Date: Wed, 23 Oct 2019 17:58:24 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Manuel López-Ibáñez <address@hidden> writes:

Hi Manuel,

> If I have this file:
>
> \begin{document}
> \ref{test}
> test
> \section{test}\label{test}
> \end{document}
>
> and I use "Change label and refs" I get this file:
>
> \begin{document}
> \ref{x}
> test
> \section{x}\label{x}
> \end{document}
>
> It doesn't make sense to change anything within \section{}.

I can reproduce that with the current Emacs master (to be Emacs 27).

While I agree with you that this doesn't make sense in your example, I
don't see how we could make it the way you want without having the risk
of missing some occurrences.  There are so many \ref and \label
variants, and of course the user is free to add their own, i.e, by
wrapping existing ones, too.

Well, at least it's a query-replace so you are asked at each occurrence
going to be replaced (unless you answer with !).

> It should be limited to \ref and variants, and \label, perhaps with a
> customized var that contains all commands that take labels and which
> argument is the label, so that users can extend it.

Given that it is quite uncommon to have a \ref that equals a \section
title (at least RefTeX suggests something like sec:title-with-hypens by
default), I'd rather leave it as it is.  Having to customize a
hypothetical reftex-ref/label-macro-regexp to match any \ref/\label
variant whose default value will probably be frequently not up-to-date
with the latest LaTeX packages doesn't seem justified.

I'm closing this report for that reason.

Bye,
Tassilo





reply via email to

[Prev in Thread] Current Thread [Next in Thread]