GNU bug report logs - #78841
reftex-get-bibfile-list fails to detect biblatex if there's no buffer for the main file

Previous Next

Package: auctex;

Reported by: Tim Ruffing <dev <at> real-or-random.org>

Date: Thu, 19 Jun 2025 19:29:04 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Tim Ruffing <dev <at> real-or-random.org>
To: Arash Esbati <arash <at> gnu.org>
Cc: 78841 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>, arne <at> arnested.dk
Subject: bug#78841: reftex-get-bibfile-list fails to detect biblatex if there's no buffer for the main file
Date: Fri, 04 Jul 2025 15:45:47 +0200
Thanks for installing the latexenc patch. :)

On Fri, 2025-07-04 at 15:07 +0200, Arash Esbati wrote:
> 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.
> 

Unless I'm mistaken, I think you misread my patch. 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.)

Best,
Tim




This bug report was last modified 30 days ago.

Previous Next


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