GNU bug report logs -
#56655
29.0.50; symbol's function definition is void: reftex-all-used-citation-keys
Previous Next
Reported by: Melody Y <melodyhaya <at> gmail.com>
Date: Wed, 20 Jul 2022 06:42:01 UTC
Severity: normal
Tags: fixed, moreinfo
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.
Full log
View this message in rfc822 format
Melody Y <melodyhaya <at> gmail.com> writes:
> When I cite after an escaping symbol, the following citation item can
> not be extracted with `reftex-all-used-citation-keys`. For example,
> \%\cite{gaoEfficientKnowledgeGraph2019}, the key
> `gaoEfficientKnowledgeGraph2019` can't be exported. But if i make
> \cite{gaoEfficientKnowledgeGraph2019} to a new line, the export will
> work. Is it possible to solve this bug?
Thanks for the report. Can you please elaborate what you mean with
"after an escaping symbol"? Does your description above apply only to
\% or also to other control symbols in TeX? The way I understand the
regexp in `reftex-all-used-citation-keys' it should only apply to \%.
Can you please try this version of the function and report back if it
works? In order to use is, you need to:
• Copy the code into into scratch buffer
• Load your .tex file and hit 'C-c [' to make sure that reftex-cite.el
is loaded
• Switch to scratch buffer and eval the function, i.e., put cursor
after the last parenthesis and hit 'C-x C-e'
• Switch to your .tex file again and run
`reftex-all-used-citation-keys'.
--8<---------------cut here---------------start------------->8---
(defun reftex-all-used-citation-keys ()
(reftex-access-scan-info)
(let ((files (reftex-all-document-files)) file keys kk k)
(save-current-buffer
(while (setq file (pop files))
(set-buffer (reftex-get-file-buffer-force file 'mark))
(save-excursion
(save-restriction
(widen)
(goto-char (point-min))
(while (re-search-forward
(concat "\\(?:^\\|\\=\\)"
"\\(?:[^%\n\r]*?\\(?:\\\\%\\)?[^%\n\r]*?\\)"
"\\\\\\(bibentry\\|[a-zA-Z]*cite[a-zA-Z]*\\)"
"\\(\\[[^]]*\\]\\)?{\\([^}]+\\)}")
nil t)
(setq kk (match-string-no-properties 3))
(while (string-match "%.*\n?" kk)
(setq kk (replace-match "" t t kk)))
(setq kk (split-string kk "[, \t\r\n]+"))
(while (setq k (pop kk))
(or (member k keys)
(setq keys (cons k keys)))))))))
(reftex-kill-temporary-buffers)
keys))
--8<---------------cut here---------------end--------------->8---
TIA. Best, Arash
This bug report was last modified 2 years and 288 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.