GNU bug report logs - #38249
12.2.0; reftex-create-bibtex-file and biblatex

Previous Next

Package: auctex;

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

Date: Sun, 17 Nov 2019 19:58:01 UTC

Severity: normal

Tags: wontfix

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 #23 received at 38249 <at> debbugs.gnu.org (full text, mbox):

From: Arash Esbati <arash <at> gnu.org>
To: gusbrs <gusbrs.2016 <at> gmail.com>
Cc: 38249 <at> debbugs.gnu.org
Subject: Re: bug#38249: 12.2.0; reftex-create-bibtex-file and biblatex
Date: Sat, 13 Apr 2024 18:09:16 +0200
Hi Gustavo,

gusbrs <gusbrs.2016 <at> gmail.com> writes:

> On Thu, 11 Apr 2024 at 12:46, Arash Esbati <arash <at> gnu.org> wrote:
>
> Just "someone" playing a little with this:
>
> (defun reftex-all-used-citation-keys-alt ()
>   (let* (keys)
>     (if (reftex-using-biblatex-p)
>         (let* ((master (reftex-TeX-master-file))
>                (bbl-file (file-name-with-extension master ".bbl")))
>           (when (file-exists-p bbl-file)
>             (with-temp-buffer
>               (insert-file-contents bbl-file)
>               (goto-char (point-min))
>               (while (re-search-forward "\\\\entry{\\([^}]*\\)}" nil t)
>                 (push (match-string-no-properties 1) keys)))))
>       (reftex-access-scan-info)
>       (let* ((files (reftex-all-document-files))
>              (aux-files (mapcar (lambda (x) (file-name-with-extension x ".aux"))
>                                 files))
>              file)
>         (while (setq file (pop aux-files))
>           (when (file-exists-p file)
>             (with-temp-buffer
>               (insert-file-contents file)
>               (goto-char (point-min))
>               (while (re-search-forward "^\\\\citation{\\([^}]*\\)}" nil t)
>                 (let ((key (match-string-no-properties 1)))
>                   (unless (member key keys)
>                     (push key keys)))))))))
>     (nreverse keys)))
>
> Quickly cooked, certainly needs polishing. But not a bad proof of
> concept, I think. Of course, this approach requires that the document
> has been compiled and the generated files are up to date with the main
> document.

Thanks, nice.  But I think the necessity you mention is also the weak
point of this approach: You can't just load a .tex file, run the caller
`reftex-create-bibtex-file' and close the file; you have to compile the
file.  So I don't think we should replace the current implementation
with the above.

>                   (unless (member key keys)
>                     (push key keys))

Can be written as:

  (cl-pushnew key keys :test #'string=)

Best, Arash




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

Previous Next


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