GNU bug report logs - #38258
12.2.0; reftex-view-crossref on citation pre- and postnotes

Previous Next

Package: auctex;

Reported by: Gustavo Barros <gusbrs.2016 <at> gmail.com>

Date: Mon, 18 Nov 2019 17:17:02 UTC

Severity: normal

Found in version 12.2.0

Done: Arash Esbati <arash <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


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

From: Gustavo Barros <gusbrs.2016 <at> gmail.com>
To: bug-auctex <at> gnu.org
Subject: 12.2.0; reftex-view-crossref on citation pre- and postnotes
Date: Mon, 18 Nov 2019 14:16:07 -0300
Hi all,

`reftex-view-crossref', when called from a prenote or postnote of a 
citation macro will assume it is a citation key and run 
`reftex-view-cr-cite' in whatever is around point, which of course won't 
be found in the bibfiles, and returns an error of "no such database 
entry", when it would be expected it to return error "Not on a crossref 
macro argument". As a result, when the point is left on a prenote or 
postnote of a citation macro, a spurious echo of "no such database 
entry" is generated.

Steps to reproduce:

Build Emacs from source (as of today, commit 
ed52618e707682e812002c98b99efe4baf43e1ca).
Start ~emacs -Q~.

Setup:

#+begin_src emacs-lisp
(add-to-list 'load-path "~/.emacs.d/elpa/auctex-12.2.0")
(load "auctex.el" nil t t)
(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq reftex-plug-into-AUCTeX t)
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)
#+end_src

Place files `mwe.tex' and `mwe_bib.bib' (respectively below) on the same 
directory.

#+begin_export latex
\documentclass{article}

\usepackage{biblatex}

\addbibresource{mwe_bib.bib}

\begin{document}

\cite[45]{sigfridsson}

\end{document}
#+end_export

#+begin_example
@article{sigfridsson,
 author       = {Sigfridsson, Emma and Ryde, Ulf},
 title        = {Comparison of methods for deriving atomic charges from 
 the electrostatic potential and moments},
 journaltitle = {Journal of Computational Chemistry},
 date         = 1998,
 volume       = 19,
 number       = 4,
 pages        = {377-395},
 doi          = 
 {10.1002/(SICI)1096-987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P},
}
#+end_example

Visit `mwe.tex' and place point in the entrykey `sigfridsson'.  Call 
`reftex-view-crossref' ("C-c &"), it will show the reference, as 
expected.

Now move point to somewhere on the prenote ("[45]"), and call 
`reftex-view-crossref' again. It returns "cite: no such database entry: 
\cite[45]", instead of the expected "reftex-view-crossref: Not on a 
crossref macro argument". Also, moving point out of the prenote and back 
to it again, and leaving it there for a while as usual, will echo "cite: 
no such database entry: \cite[45]", whereas no echo was to be expected.

Best regards,
Gustavo Barros.



Emacs  : GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 
3.22.30)
of 2019-11-18
Package: 12.2.0

current state:
==============
(setq
AUCTeX-date "2019-10-31"
window-system 'x
LaTeX-version "2e"
TeX-style-path '("~/.emacs.d/auctex" 
"/home/gustavo/.emacs.d/elpa/auctex-12.2.0/style"
		  "/home/gustavo/.emacs.d/auctex/auto" 
		  "/home/gustavo/.emacs.d/auctex/style" "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 ams-tex-mode texinfo-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
		     (plain-tex-mode latex-mode doctex-mode ams-tex-mode 
		     texinfo-mode context-mode) :help
		     "Run BibTeX")
		    ("Biber" "biber %s" TeX-run-Biber nil
		     (plain-tex-mode latex-mode doctex-mode ams-tex-mode 
		     texinfo-mode) :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
		     (plain-tex-mode latex-mode doctex-mode ams-tex-mode 
		     texinfo-mode) :help
		     "Generate PostScript file")
		    ("Dvips" "%(o?)dvips %d -o %f " TeX-run-dvips nil
		     (plain-tex-mode latex-mode doctex-mode ams-tex-mode 
		     texinfo-mode) :help
		     "Convert DVI file to PostScript")
		    ("Dvipdfmx" "dvipdfmx %d" TeX-run-dvipdfmx nil
		     (plain-tex-mode latex-mode doctex-mode ams-tex-mode 
		     texinfo-mode) :help
		     "Convert DVI file to PDF with dvipdfmx")
		    ("Ps2pdf" "ps2pdf %f" TeX-run-ps2pdf nil
		     (plain-tex-mode latex-mode doctex-mode ams-tex-mode 
		     texinfo-mode) :help
		     "Convert PostScript file to PDF")
		    ("Glossaries" "makeglossaries %s" TeX-run-command 
		    nil
		     (plain-tex-mode latex-mode doctex-mode ams-tex-mode 
		     texinfo-mode) :help
		     "Run makeglossaries to create glossary\n     file")
		    ("Index" "makeindex %s" TeX-run-index nil
		     (plain-tex-mode latex-mode doctex-mode ams-tex-mode 
		     texinfo-mode) :help
		     "Run makeindex to create index file")
		    ("upMendex" "upmendex %s" TeX-run-index t
		     (plain-tex-mode latex-mode doctex-mode ams-tex-mode 
		     texinfo-mode) :help
		     "Run upmendex to create index file")
		    ("Xindy" "texindy %s" TeX-run-command nil
		     (plain-tex-mode latex-mode doctex-mode ams-tex-mode 
		     texinfo-mode) :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"))
)




This bug report was last modified 1 year and 37 days ago.

Previous Next


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