emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#37861: closed (bug in reftex: Change label and ref


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#37861: closed (bug in reftex: Change label and refs)
Date: Wed, 23 Oct 2019 15:59:01 +0000

Your message dated Wed, 23 Oct 2019 17:58:24 +0200
with message-id <address@hidden>
and subject line Re: bug#37861: bug in reftex: Change label and refs
has caused the debbugs.gnu.org bug report #37861,
regarding bug in reftex: Change label and refs
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden.)


-- 
37861: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=37861
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: bug in reftex: Change label and refs Date: Mon, 21 Oct 2019 19:02:47 +0100 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0
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{}. 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.


Emacs  : GNU Emacs 25.2.2 (x86_64-pc-linux-gnu, GTK+ Version 3.22.21)
 of 2017-09-22, modified by Debian
Package: 11.91

current state:
==============
(setq
 AUCTeX-date "2017-07-24"
 window-system 'x
 LaTeX-version "2e"
 TeX-style-path '("/var/lib/auctex/emacs25/"
                  "/usr/share/emacs/site-lisp/auctex/style"
                  "/home/manu/.emacs.d/auctex/.auctex-auto"
                  "/home/manu/.emacs.d/auctex/style" ".auctex-auto" "style")
 TeX-auto-save t
 TeX-parse-self t
 TeX-master t
 TeX-command-list '(("TeX"
"%(PDF)%(tex) %(file-line-error) %(extraopts) %`%S%(PDFout)%(mode)%' %t"
                     TeX-run-TeX nil
                     (plain-tex-mode texinfo-mode ams-tex-mode) :help
                     "Run plain TeX")
                    ("LaTeX" "%`%l%(mode)%' %t" TeX-run-TeX nil
                     (latex-mode doctex-mode) :help "Run LaTeX")
                    ("Makeinfo" "makeinfo %(extraopts) %t" TeX-run-compile nil
                     (texinfo-mode) :help "Run Makeinfo with Info output")
                    ("Makeinfo HTML" "makeinfo %(extraopts) --html %t"
                     TeX-run-compile nil (texinfo-mode) :help
                     "Run Makeinfo with HTML output")
                    ("AmSTeX" "amstex %(PDFout) %(extraopts) %`%S%(mode)%' %t"
                     TeX-run-TeX nil (ams-tex-mode) :help "Run AMSTeX")
                    ("ConTeXt"
                     "%(cntxcom) --once --texutil %(extraopts) %(execopts)%t"
                     TeX-run-TeX nil (context-mode) :help "Run ConTeXt once")
                    ("ConTeXt Full" "%(cntxcom) %(extraopts) %(execopts)%t"
                     TeX-run-TeX nil (context-mode) :help
                     "Run ConTeXt until completion")
                    ("BibTeX" "bibtex %s" TeX-run-BibTeX nil t :help
                     "Run BibTeX")
                    ("Biber" "biber %s" TeX-run-Biber nil t :help "Run Biber")
                    ("View" "%V" TeX-run-discard-or-function t t :help
                     "Run Viewer")
                    ("Print" "%p" TeX-run-command t t :help "Print the file")
                    ("Queue" "%q" TeX-run-background nil t :help
                     "View the printer queue" :visible TeX-queue-command)
                    ("File" "%(o?)dvips %d -o %f " TeX-run-dvips t t :help
                     "Generate PostScript file")
                    ("Dvips" "%(o?)dvips %d -o %f " TeX-run-dvips nil t :help
                     "Convert DVI file to PostScript")
                    ("Dvipdfmx" "dvipdfmx %d" TeX-run-dvipdfmx nil t :help
                     "Convert DVI file to PDF with dvipdfmx")
                    ("Ps2pdf" "ps2pdf %f" TeX-run-ps2pdf nil t :help
                     "Convert PostScript file to PDF")
                    ("Index" "makeindex %s.idx" TeX-run-index nil t :help
                     "Run makeindex to create index file")
                    ("Xindy" "texindy %s" TeX-run-command nil t :help
                     "Run xindy to create index file")
                    ("Check" "lacheck %s" TeX-run-compile nil (latex-mode)
                     :help "Check LaTeX file for correctness")
                    ("ChkTeX" "chktex -v6 %s" TeX-run-compile nil (latex-mode)
                     :help "Check LaTeX file for common mistakes")
                    ("Spell" "(TeX-ispell-document \"\")" TeX-run-function nil
                     t :help "Spell-check the document")
                    ("Clean" "TeX-clean" TeX-run-function nil t :help
                     "Delete generated intermediate files")
                    ("Clean All" "(TeX-clean t)" TeX-run-function nil t :help
                     "Delete generated intermediate and output files")
                    ("Other" "" TeX-run-command t t :help
                     "Run an arbitrary command")
                    )
 )



--- End Message ---
--- Begin Message --- Subject: Re: 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


--- End Message ---

reply via email to

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