Subject: 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: Fri, 04 Jul 2025 15:07:12 +0200

Tim Ruffing <[email-masked]> writes:

> Independently of latexenc (which should be fixed, yes),

I installed my proposed change incl. comments from Stefan with commit
22daed7c.

Reg. your change and the scenarios:

>>  * latexenc-dont-use-TeX-master-flag is t

I think if people touch that, the know what they're doing.

>>  * latexenc will be removed or changed in the future

This is somewhat unlikely, but Emacs obsoleting process takes some
years, so I'd say let's think about this once it is imminent.

>>  * the \addbibresource commands is not in the same file as
>>    \usepackage{biblatex}

I think removing the check for `TeX-active-styles' is not a good idea.
This will effectively removes the scenario where you can do in your
main-file.tex:

  \usepackage{mypackages}

and mypackage.el contains:

  \RequirePackage{biblatex}

Currently, you can write an AUCTeX style mypackage.el which does:

  (TeX-run-style-hooks "biblatex")

and the current code works correctly.  Your proposed change kills this.

So overall, I tend to keep what we have now after fixing latexenc.el.

Best, Arash