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: Thu, 10 Jul 2025 17:50:44 +0200

Tim Ruffing <[email-masked]> writes:

> Thanks for installing the latexenc patch. :)

Thanks for raising this issue in the first place.

> Unless I'm mistaken, I think you misread my patch.

Yes, sorry, my bad.  I misremembered what we talked about up-thread.

> Sorry for not explaining it in more detail. What this does is that it
> removes reftex- using-biblatex-p, effectively replacing it by "t". In
> other words, the detection is removed, and it is conservatively
> assumed that biblatex is used. As a result,
> reftex-locate-bibliography-files will always consider all
> \bibliography or \addbibresource macros. Removing the detection
> heuristic will eliminate all bugs in it. ;)
>
> The only drawback is potentially decreased performance for users that
> don't use biblatex. I haven't benchmarked this, but I really think the
> overhead, if any, should be entirely negligible on a contemporary
> machine. (Also consider that detection also has a runtime cost.)

TBH, I'm reluctant about changing code which served well for more than a
decade.  And IIRC, we're talking about some corner cases.  So my vote is
to leave this now as is.  I'm afraid that someone will come back to us
and says: I use bibtex and have a .tex file like this:

  \documentclass{article}
  \bibliographystyle{plain}
  \begin{document}
  Text
  \bibliography{biblatex-bib1}
  \bibliography{biblatex-bib2}
  \end{document}

And now, RefTeX shows me also not usable entries from biblatex-bib2.bib.

Best, Arash