Subject: Re: bug#78841: reftex-get-bibfile-list fails to detect biblatex if there's no buffer for the main file

From: Arash Esbati <[email-masked]>
Date: Mon, 23 Jun 2025 12:11:56 +0200

Tim Ruffing <[email-masked]> writes:

> The thing is: As I said above, chapter.tex already knows that biblatex
> is used (because "biblatex" is in the list returned by (TeX-style-list)
> when called in chapter.tex). But the real issue is that this
> information will simply not be used when the main.tex buffer is checked
> in fundamental mode. 

I assembled a minimal set of files and tried to understand this.  The
files are attached, just save them in a temp directory, open
biblatex-main.tex and hit 'C-c C-n' to parse the file.  Now open a new
Emacs instance with 'emacs -Q' and eval this in scratch:

--8<---------------cut here---------------start------------->8---
(progn
  (package-initialize t)
  (package-activate 'auctex)

  ;; Alternatively adjust the path below and eval this if the above
  ;; doesn't work with Doom-Emacs:
  ;; (load "~/path/to/auctex/auctex-autoloads.el" nil t t)
  (setq-default TeX-master nil)
  (setq TeX-parse-self t)
  (add-hook 'LaTeX-mode-hook #'reftex-mode)
  (setq reftex-plug-into-AUCTeX t) )
--8<---------------cut here---------------end--------------->8---

I admit I have no idea how Doom manages its packages, so you can load
auctex-autoloads.el if the package-... functions don't work with Doom.
Once done, visit biblatex-sub.tex with this setup.  For me, all works as
expected and RefTeX finds both databases.  This is what I see when I hit
'C-c C-m cite RET . RET':

Can we please take this now from here?  Otherwise it's too confusing.
Thanks.

Best, Arash