GNU bug report logs -
#78841
reftex-get-bibfile-list fails to detect biblatex if there's no buffer for the main file
Previous Next
To reply to this bug, email your comments to 78841 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-auctex <at> gnu.org
:
bug#78841
; Package
auctex
.
(Thu, 19 Jun 2025 19:29:04 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Tim Ruffing <dev <at> real-or-random.org>
:
New bug report received and forwarded. Copy sent to
bug-auctex <at> gnu.org
.
(Thu, 19 Jun 2025 19:29:04 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
With (default) settings
(setq reftex-initialize-temporary-buffers nil)
(setq reftex-keep-temporary-buffers 1)
assume you call (reftex-get-bibfile-list) in a chapter.tex buffer but
there's no buffer yet for the main file main.tex that looks like this:
\documentclass{standalone}
\usepackage{biblatex}
\addbibresource{1.bib}
\addbibresource{2.bib}
\begin{document}
\input{chapter.tex}
\end{document}
Then reftex-get-bibfile-list will return only the first bib file but it
is supposed to return both bib files.
The problem is that reftex-locate-bibliography-files tries to figure
out whether biblatex is used, i.e., whether it needs to continue
searching after the first bibliography command. It does so (also) in
main.tex, which has beem opened only as a temp buffer in fundamental
mode. Whether biblatex is used is determined in reftex-using-biblatex-
p, which relies on the value of TeX-active-styles if (boundp 'TeX-
active-styles).
But the latter is the wrong condition: (boundp 'TeX-active-styles) is
true in fundamental mode because 'Tex-active-styles has a (global)
binding of nil.
Replacing
(boundp 'TeX-active-styles)
by
(local-variable-p 'TeX-active-styles)
fixes this check for me. Then reftex-using-biblatex-p will fall back on
a "poor-man's check" (according to the comment in the code), which
looks for \usepackage{biblatex} using some regex.
However, while this patch would fix the problem for me, I still don't
like the resulting code:
* In fact, checking TeX-active-styles would work if only the check was
done in the chapter.tex buffer from which reftex-get-bibfile-list is
called, but it's instead done in each buffer separately.
* Similarly, the poor man's check is done in each buffer separately. I
think this means that also the poor man's check will only work for
any \addbibresource command which happens to be in the same buffer
as \usepackage{biblatex}.
I think this logic is broken. Whether biblatex is used or not should
not be judged in each file of a multifile document separately. Either
the entire document uses biblatex, or it doesn't. As a result,
replacing boundp by local-variable-p is only my second best suggestion.
My best suggestion is to get rid of reftex-using-biblatex-p entirely,
and assume it's always true. In other words, never stop after the first
\addbibresource (or rather \bibliography) command has been found. This
gets rid of the broken logic and both imperfect heuristics. I assume
this is fine performance-wise, and I assume this is what one would do
when asked to reimplement this from scratch.
A look at the history shows that the initial code that stops after the
first value is is >25 years old (and this is just how far back git
goes). Back then there was only bibtex and it was okay to stop after
the first \bibliography, and CPUs were way slower. Then in 2013, the
fix for biblatex was added, but it was done in an attempt to keep the
early return if biblatex is not used.
I'm happy to provide a proper patch for either suggestion, but they're
both trivial enough that you'll probably do the changes yourself
quicker than asking me for the patch.
Best,
Tim
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#78841
; Package
auctex
.
(Sat, 21 Jun 2025 15:43:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 78841 <at> debbugs.gnu.org (full text, mbox):
Tim Ruffing <dev <at> real-or-random.org> writes:
> With (default) settings
>
> (setq reftex-initialize-temporary-buffers nil)
> (setq reftex-keep-temporary-buffers 1)
>
> assume you call (reftex-get-bibfile-list) in a chapter.tex buffer but
> there's no buffer yet for the main file main.tex that looks like this:
>
> \documentclass{standalone}
> \usepackage{biblatex}
> \addbibresource{1.bib}
> \addbibresource{2.bib}
> \begin{document}
> \input{chapter.tex}
> \end{document}
Is this with AUCTeX? I'm asking because AUCTeX opens the master file in
the background when you visit a subfile. So your chapter.tex should
look like this:
--8<---------------cut here---------------start------------->8---
Content of chapter.tex
%%% Local Variables:
%%% mode: LaTeX
%%% TeX-master: "main.tex"
%%% End:
--8<---------------cut here---------------end--------------->8---
> Then reftex-get-bibfile-list will return only the first bib file but it
> is supposed to return both bib files.
>
> The problem is that reftex-locate-bibliography-files tries to figure
> out whether biblatex is used, i.e., whether it needs to continue
> searching after the first bibliography command. It does so (also) in
> main.tex, which has beem opened only as a temp buffer in fundamental
> mode.
Can you come up with couple of minimal files and an exact recipe how to
do this? In my case, main.tex if opened, see above.
> Whether biblatex is used is determined in reftex-using-biblatex-p,
> which relies on the value of TeX-active-styles if (boundp
> 'TeX-active-styles).
>
> But the latter is the wrong condition: (boundp 'TeX-active-styles) is
> true in fundamental mode because 'Tex-active-styles has a (global)
> binding of nil.
>
> Replacing
> (boundp 'TeX-active-styles)
> by
> (local-variable-p 'TeX-active-styles)
> fixes this check for me.
I think the correct fix is to replace (boundp 'TeX-active-styles) with:
(and (fboundp 'TeX-style-list)
(TeX-style-list))
> Then reftex-using-biblatex-p will fall back on a "poor-man's check"
> (according to the comment in the code), which looks for
> \usepackage{biblatex} using some regex.
>
> I think this logic is broken. Whether biblatex is used or not should
> not be judged in each file of a multifile document separately. Either
> the entire document uses biblatex, or it doesn't. As a result,
> replacing boundp by local-variable-p is only my second best suggestion.
I'm not sure I follow: `TeX-style-list' returns all active styles for
the entire document, the test is done on a per file basis, but the final
result goes for the entire document.
> My best suggestion is to get rid of reftex-using-biblatex-p entirely,
> and assume it's always true.
I'm not convinced yet that this a good idea. The way around, the
current code is in place for >25 years now and the number of complaints
were low :-)
Best, Arash
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#78841
; Package
auctex
.
(Sat, 21 Jun 2025 20:06:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 78841 <at> debbugs.gnu.org (full text, mbox):
On Sat, 2025-06-21 at 17:42 +0200, Arash Esbati wrote:
> Is this with AUCTeX? I'm asking because AUCTeX opens the master file
> in
> the background when you visit a subfile. So your chapter.tex should
> look like this:
>
> --8<---------------cut here---------------start------------->8---
> Content of chapter.tex
>
> %%% Local Variables:
> %%% mode: LaTeX
> %%% TeX-master: "main.tex"
> %%% End:
> --8<---------------cut here---------------end--------------->8---
>
Oh, that's interesting. I didn't use a local variables section, but I
have this in my config instead:
(setq-default TeX-master "main")
And this works, at least in principle. In chapter.tex, (TeX-master-
file) returns "main". And also compilation works properly and uses the
main file.
But this appears to make a difference for reftex-get-bibfile-list! I
get both bib files 1.bib and 2.bib with this chapter.tex as you
suggested:
%%% Local Variables:
%%% mode: LaTeX
%%% TeX-master: "main.tex"
%%% End:
But only 1.bib with this chapter.tex (and still setting TeX-master in
my config).
%%% Local Variables:
%%% mode: LaTeX
%%% End:
(When testing, make sure to restart emacs first.)
This shouldn't happen, (setq-default TeX-master "main") is suggested in
the docs, so it should not make a difference whether it's set as a
local variable in the file or as a default in the config.
But okay, this is probably the reason why noone has discovered this
before. I haven't investigated the root cause for this, but let me know
if you can reproduce it now.
> I think the correct fix is to replace (boundp 'TeX-active-styles)
> with:
>
> (and (fboundp 'TeX-style-list)
> (TeX-style-list))
>
Sure, sounds better, yes. I think that change should be applied in any
case (unless the code is removed entirely).
> > Then reftex-using-biblatex-p will fall back on a "poor-man's check"
> > (according to the comment in the code), which looks for
> > \usepackage{biblatex} using some regex.
> >
> > I think this logic is broken. Whether biblatex is used or not
> > should
> > not be judged in each file of a multifile document separately.
> > Either
> > the entire document uses biblatex, or it doesn't. As a result,
> > replacing boundp by local-variable-p is only my second best
> > suggestion.
>
> I'm not sure I follow: `TeX-style-list' returns all active styles for
> the entire document, the test is done on a per file basis, but the
> final
> result goes for the entire document.
Well okay, if AUCTeX is used, then you're right: the result is the same
for all files. But if the poor man's check is used, the regexp is
really checked separately in each file (if I'm not mistaken). One could
argue that this is good enough for a poor man's check. It will work as
long as the bib files are loaded in the same file that contains
\usepackage{biblatex}, which is probably the common case even for
multifile docs. But still, the behavior is a bit erratic. Then, in the
above examples, loading two bib files will work in main.tex but not in
chapter.tex.
>
> > My best suggestion is to get rid of reftex-using-biblatex-p
> > entirely,
> > and assume it's always true.
>
> I'm not convinced yet that this a good idea. The way around, the
> current code is in place for >25 years now and the number of
> complaints
> were low :-)
Not exactly, the biblatex support has been there only for 12 years. ;)
But yeah, I agree it's still a very long time for code.
Best,
Tim
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#78841
; Package
auctex
.
(Sun, 22 Jun 2025 12:54:04 GMT)
Full text and
rfc822 format available.
Message #14 received at 78841 <at> debbugs.gnu.org (full text, mbox):
On Sat, 2025-06-21 at 22:05 +0200, Tim Ruffing wrote:
> I haven't investigated the root cause for this, but let me know
> if you can reproduce it now.
Update:
If you have the "%%% TeX-master: "main.tex" line, what will open and
keep open the main.tex buffer when opening chapter.tex is *not* AUCTeX
but the built-in latexenc.el. This is what debug-on-entry find-file-
noselect tells me, and you can confirm it by setting
(setq latexenc-dont-use-TeX-master-flag nil),
and just to make sure, also
(setq latexenc-dont-use-tex-guess-main-file-flag nil).
And this makes exactly the bug. So another reproducer is:
config:
(setq latexenc-dont-use-TeX-master-flag nil) ; this is new
(setq latexenc-dont-use-tex-guess-main-file-flag nil) ; why not
(setq reftex-initialize-temporary-buffers nil) ; default
(setq reftex-keep-temporary-buffers 1) ; default
chapter.tex:
%%% Local Variables:
%%% mode: LaTeX
%%% TeX-master: "main.tex"
%%% End:
main.tex:
\documentclass{standalone}
\usepackage{biblatex}
\addbibresource{1.bib}
\addbibresource{2.bib}
\begin{document}
\input{chapter.tex}
\end{document}
However, you're still right. AUCTeX will *also* open main.tex when it's
initialized in chapter.tex. And in particular, even with the above
reproducer, i.e., even with latexenc-dont-use-TeX-master-flag set to
nil, "biblatex" will be in (TeX-style-list) when called in chapter.tex.
That means that AUCTeX correctly figures out the main file and parses
it (but it won't keep the main.tex buffer open unlike latexenc).
What happens then is what I described in my initial email. reftex will
open main.tex as a temp buffer in fundamental mode, and so on...
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.
And I believe that this analysis now really shows that either the call
to (TeX-style-list) should be performed in the buffer in which (reftex-
get-bibfile-list) is called (instead of calling it separately in each
searched buffer). Or simpler, as I've initially suggested, just never
stop after the first occurrence of a bibliography command, and the
problem will just disappear entirely.
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#78841
; Package
auctex
.
(Sun, 22 Jun 2025 12:55:04 GMT)
Full text and
rfc822 format available.
Message #17 received at 78841 <at> debbugs.gnu.org (full text, mbox):
Sorry for another email. Just for completeness, this is on
AUCTeX 14.0.9 and Emacs 30.1, and I use Doom Emacs.
Tim
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#78841
; Package
auctex
.
(Mon, 23 Jun 2025 10:13:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 78841 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Tim Ruffing <dev <at> real-or-random.org> 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':
[snap.png (image/png, inline)]
[Message part 3 (text/plain, inline)]
Can we please take this now from here? Otherwise it's too confusing.
Thanks.
Best, Arash
[biblatex-main.tex (application/x-tex, attachment)]
[biblatex-sub.tex (application/x-tex, attachment)]
[biblatex-bib1.bib (application/octet-stream, attachment)]
[biblatex-bib2.bib (application/octet-stream, attachment)]
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#78841
; Package
auctex
.
(Mon, 23 Jun 2025 19:56:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 78841 <at> debbugs.gnu.org (full text, mbox):
Hi again, thanks for taking the time and sorry that my instructions
were still unclear. I can't reproduce the bug with your commands only,
but I can reproduce it if I add this line
(setq latexenc-dont-use-TeX-master-flag nil)
as mentioned in my previous email.
Consider this "init.el" file:
--8<---------------cut here---------------start------------->8---
(package-initialize t)
(package-activate 'auctex)
;; I use this:
;(add-to-list 'load-path "~/.config/emacs/.local/straight/build-30.1/auctex")
;(load "auctex-autoloads.el" nil t t)
(setq TeX-parse-self t)
(add-hook 'LaTeX-mode-hook #'reftex-mode)
(setq reftex-plug-into-AUCTeX t)
;; Either uncomment this and keep the "TeX-master" line in biblatex-sub.tex
(setq-default TeX-master nil)
(setq latexenc-dont-use-TeX-master-flag t)
;; Or uncomment this and remove the TeX-master-line in biblatex-sub.tex
;(setq latexenc-dont-use-TeX-master-flag nil)
;(setq-default TeX-master "biblatex-main")
(find-file "./biblatex-sub.tex")
;; Print to stdout for quicker debugging
(print (reftex-get-bibfile-list) 'external-debugging-output)
--8<---------------cut here---------------end------------->8---
Here are step-by-step instructions:
* Save your minimal set of files in a temp directory
* Add an init.el file as above to the directory
* cd to the temp directory
* Run: emacs --init-directory=. --no-splash
Expected outcome:
* Two file paths are printed to stdout
* If you try to add a citation, both entries are found
Actual outcome:
* Only one file paths is printed to stdout
* If you try to add a citation, only one entry is found
Best,
Tim
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#78841
; Package
auctex
.
(Tue, 24 Jun 2025 08:16:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 78841 <at> debbugs.gnu.org (full text, mbox):
Tim Ruffing <dev <at> real-or-random.org> writes:
> Hi again, thanks for taking the time and sorry that my instructions
> were still unclear.
Thanks for checking, and no problem 👍
> I can't reproduce the bug with your commands only,
Good.
> but I can reproduce it if I add this line (setq
> latexenc-dont-use-TeX-master-flag nil) as mentioned in my previous
> email.
Ok. But this is not a real requirement, right? This is just to
showcase the issue. Your setup involves setting `TeX-master' to a
constant string, right? If so, can you please delete this line:
%%% TeX-master: "biblatex-main"
in biblatex-sub.tex and save it, start a new Emacs with 'emacs -Q', eval
this in scratch:
--8<---------------cut here---------------start------------->8---
(progn
(load "~/.config/emacs/.local/straight/build-30.1/auctex/auctex-autoloads.el" nil t t)
(setq-default TeX-master "biblatex-main")
(setq TeX-parse-self t)
(add-hook 'LaTeX-mode-hook #'reftex-mode)
(setq reftex-plug-into-AUCTeX t)
(defun latexenc-find-file-coding-system (arg-list)
"Determine the coding system of a LaTeX file if it uses \"inputenc.sty\".
The mapping from LaTeX's \"inputenc.sty\" encoding names to Emacs
coding system names is determined from `latex-inputenc-coding-alist'."
(if (eq (car arg-list) 'insert-file-contents)
(save-excursion
;; try to find the coding system in this file
(goto-char (point-min))
(if (catch 'cs
(let ((case-fold-search nil))
(while (search-forward "inputenc" nil t)
(goto-char (match-beginning 0))
(beginning-of-line)
(if (or (looking-at "[^%\n]*\\\\usepackage\\[\\([^]]*\\)\\]{\\([^}]*,\\)?inputenc\\(,[^}]*\\)?}")
(looking-at "[^%\n]*\\\\inputencoding{\\([^}]*\\)}"))
(throw 'cs t)
(goto-char (match-end 0))))))
(let* ((match (match-string 1))
(sym (or (latexenc-inputenc-to-coding-system match)
(intern match))))
(cond
((coding-system-p sym) sym)
((and (require 'code-pages nil t) (coding-system-p sym)) sym)
(t 'undecided)))
;; else try to find it in the master/main file
;; Fixme: If the current file is in an archive (e.g. tar,
;; zip), we should find the master file in that archive.
;; But, that is not yet implemented. -- K.Handa
(let ((default-directory (if (stringp (nth 1 arg-list))
(file-name-directory (nth 1 arg-list))
default-directory))
latexenc-main-file)
;; Is there a TeX-master or tex-main-file in the local variables
;; section?
(unless latexenc-dont-use-TeX-master-flag
(goto-char (point-max))
(search-backward "\n\^L" (max (- (point-max) 3000) (point-min))
'move)
(search-forward "Local Variables:" nil t)
(when (or (re-search-forward
"^%+ *\\(TeX-master\\|tex-main-file\\): *\"\\(.+\\)\""
nil t)
;; Addition start
(and (boundp 'TeX-master)
(stringp (default-value 'TeX-master)))
;; Addition end
)
(let ((file
;; Addition start
(or (match-string 2)
(and (boundp 'TeX-master)
(default-value 'TeX-master))
;; Addition end
)))
(dolist (ext `("" ,(if (boundp 'TeX-default-extension)
(concat "." TeX-default-extension)
"")
".tex" ".ltx" ".dtx" ".drv"))
(if (and (null latexenc-main-file) ;Stop at first.
(file-exists-p (concat file ext)))
(setq latexenc-main-file (concat file ext)))))))
;; try tex-modes tex-guess-main-file
(when (and (not latexenc-dont-use-tex-guess-main-file-flag)
(not latexenc-main-file))
;; Use a separate `when' so the byte-compiler sees the fboundp.
(when (fboundp 'tex-guess-main-file)
(let ((tex-start-of-header "\\\\document\\(style\\|class\\)"))
(setq latexenc-main-file (tex-guess-main-file)))))
;; if we found a master/main file get the coding system from it
(if (and latexenc-main-file
(file-regular-p latexenc-main-file)
(file-readable-p latexenc-main-file))
(let* ((latexenc-dont-use-tex-guess-main-file-flag t)
(latexenc-dont-use-TeX-master-flag t)
(latexenc-main-buffer
(find-file-noselect latexenc-main-file t)))
(coding-system-base ;Disregard the EOL part of the CS.
(with-current-buffer latexenc-main-buffer
(or coding-system-for-write buffer-file-coding-system
'undecided))))
'undecided))))
'undecided)) )
--8<---------------cut here---------------end--------------->8---
and try it again? IIUC, `latexenc-find-file-coding-system' isn't
prepared to deal with `TeX-master' set to a string top-level. My change
above adds that.
Best, Arash
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#78841
; Package
auctex
.
(Tue, 24 Jun 2025 08:52:02 GMT)
Full text and
rfc822 format available.
Message #29 received at 78841 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Thanks for the quick reply!
On Tue, 2025-06-24 at 10:14 +0200, Arash Esbati wrote:
> Ok. But this is not a real requirement, right? This is just to
> showcase the issue. Your setup involves setting `TeX-master' to a
> constant string, right? If so, can you please delete this line:
>
Indeed, this is just to showcase the issue. See the comments in my
"init.el" snippet from my previous mail which have instructions to
reproduce the issue without the "%%% TeX-master:" line.
> (IIUC, `latexenc-find-file-coding-system' isn't
> prepared to deal with `TeX-master' set to a string top-level. My
> change
> above adds that.
I've tested this, and this works in this specific case. But are you
really suggesting this as a fix?
I feel this is building a hack on top of another. If AUCTeX needs the
master file to be open, then it just should open it and not rely on
latexenc to open it.
Your change doesn't solve the issue if any of the following happens:
* latexenc-dont-use-TeX-master-flag is t
* latexenc will be removed or changed in the future
* the \addbibresource commands is not in the same file as
\usepackage{biblatex}, see the test case in the attached zip.
(Again, extract it to some folder, cd into the folder with the tex
files, and run `emacs --init-directory=. --no-splash`)
[reftex-bug.zip (application/zip, attachment)]
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#78841
; Package
auctex
.
(Wed, 25 Jun 2025 07:16:03 GMT)
Full text and
rfc822 format available.
Message #32 received at 78841 <at> debbugs.gnu.org (full text, mbox):
Tim Ruffing <dev <at> real-or-random.org> writes:
> I've tested this, and this works in this specific case.
Thanks.
> But are you really suggesting this as a fix?
The way I see it this is a bug in latexenc.el which we should try to fix
anyway. That would basically improve the current state.
> I feel this is building a hack on top of another.
Maybe, OTOH, mule-conf.el which adds
("\\.\\(tex\\|ltx\\|dtx\\|drv\\)\\'" . latexenc-find-file-coding-system)
to `file-coding-system-alist' is pre-loaded in Emacs. So I would argue
we're relying on Emacs' default behavior here. And if people remove
that entry, they should know what they're doing.
> If AUCTeX needs the master file to be open, then it just should open
> it and not rely on latexenc to open it.
Will take a closer look at this later, but remember that RefTeX should
also work without AUCTeX, so this point isn't much relevant.
> Your change doesn't solve the issue if any of the following happens:
> * latexenc-dont-use-TeX-master-flag is t
> * latexenc will be removed or changed in the future
> * the \addbibresource commands is not in the same file as
> \usepackage{biblatex}, see the test case in the attached zip.
> (Again, extract it to some folder, cd into the folder with the tex
> files, and run `emacs --init-directory=. --no-splash`)
I see your point, but I think these are sort of corner cases, given how
many times they were raised in the past. I currently don't have the
time and energy to solve this issue in a way which can deal with all the
cases above, but I'll be happy to review and install such a change.
Patches are welcome.
Best, Arash
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#78841
; Package
auctex
.
(Wed, 25 Jun 2025 19:12:02 GMT)
Full text and
rfc822 format available.
Message #35 received at 78841 <at> debbugs.gnu.org (full text, mbox):
Tim Ruffing <dev <at> real-or-random.org> writes:
>> IIUC, `latexenc-find-file-coding-system' isn't prepared to deal with
>> `TeX-master' set to a string top-level. My change above adds that.
>
> I've tested this, and this works in this specific case.
Arne, we have a bug report for AUCTeX where I found that the function
`latexenc-find-file-coding-system' can't deal with `TeX-master' or
`tex-main-file' set to a constant string in the init file and not as
file local variable. I'm not really familiar with your code, but the
following small change is reported to fix the issue, at least for
AUCTeX:
--8<---------------cut here---------------start------------->8---
diff --git a/lisp/international/latexenc.el b/lisp/international/latexenc.el
index 1b735810ee4..b7b022e68c4 100644
--- a/lisp/international/latexenc.el
+++ b/lisp/international/latexenc.el
@@ -144,17 +144,26 @@ latexenc-find-file-coding-system
(file-name-directory (nth 1 arg-list))
default-directory))
latexenc-main-file)
- ;; Is there a TeX-master or tex-main-file in the local variables
- ;; section?
+ ;; Is there a TeX-master or tex-main-file in the local
+ ;; variables section or is it globally set to a constant
+ ;; string?
(unless latexenc-dont-use-TeX-master-flag
(goto-char (point-max))
(search-backward "\n\^L" (max (- (point-max) 3000) (point-min))
'move)
(search-forward "Local Variables:" nil t)
- (when (re-search-forward
- "^%+ *\\(TeX-master\\|tex-main-file\\): *\"\\(.+\\)\""
- nil t)
- (let ((file (match-string 2)))
+ (when (or (re-search-forward
+ "^%+ *\\(TeX-master\\|tex-main-file\\): *\"\\(.+\\)\""
+ nil t)
+ (and (bound-and-true-p 'TeX-master)
+ (stringp (default-value 'TeX-master)))
+ (and (bound-and-true-p 'tex-main-file)
+ (stringp (default-value 'tex-main-file))))
+ (let ((file (or (match-string 2)
+ (and (boundp 'TeX-master)
+ (default-value 'TeX-master))
+ (and (boundp 'tex-main-file)
+ (default-value 'tex-main-file)))))
(dolist (ext `("" ,(if (boundp 'TeX-default-extension)
(concat "." TeX-default-extension)
"")
@@ -180,7 +189,7 @@ latexenc-find-file-coding-system
(coding-system-base ;Disregard the EOL part of the CS.
(with-current-buffer latexenc-main-buffer
(or coding-system-for-write buffer-file-coding-system
- 'undecided))))
+ 'undecided))))
'undecided))))
'undecided))
--8<---------------cut here---------------end--------------->8---
Do you have any comments on this?
@Stefan: FYI, I'm not familiar with tex-mode.el and what `tex-main-file'
does, maybe you can review the change above for tex-mode.el. TIA.
Best, Arash
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#78841
; Package
auctex
.
(Thu, 26 Jun 2025 09:52:01 GMT)
Full text and
rfc822 format available.
Message #38 received at 78841 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Arash Esbati <arash <at> gnu.org> writes:
> Arne, we have a bug report for AUCTeX where I found that the function
> `latexenc-find-file-coding-system' can't deal with `TeX-master' or
> `tex-main-file' set to a constant string in the init file and not as
> file local variable. I'm not really familiar with your code, but the
> following small change is reported to fix the issue, at least for
> AUCTeX:
My apologies, my last proposal was broken, please consider the one
attached.
Best, Arash
[latexenc.patch (text/x-patch, attachment)]
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#78841
; Package
auctex
.
(Sat, 28 Jun 2025 23:34:04 GMT)
Full text and
rfc822 format available.
Message #41 received at 78841 <at> debbugs.gnu.org (full text, mbox):
>> Arne, we have a bug report for AUCTeX where I found that the function
>> `latexenc-find-file-coding-system' can't deal with `TeX-master' or
>> `tex-main-file' set to a constant string in the init file and not as
>> file local variable. I'm not really familiar with your code, but the
>> following small change is reported to fix the issue, at least for
>> AUCTeX:
> My apologies, my last proposal was broken, please consider the one
> attached.
>
> Best, Arash
>
> diff --git a/lisp/international/latexenc.el b/lisp/international/latexenc.el
> index 1b735810ee4..805a74c52c5 100644
> --- a/lisp/international/latexenc.el
> +++ b/lisp/international/latexenc.el
> @@ -144,17 +144,26 @@ latexenc-find-file-coding-system
> (file-name-directory (nth 1 arg-list))
> default-directory))
> latexenc-main-file)
> - ;; Is there a TeX-master or tex-main-file in the local variables
> - ;; section?
> + ;; Is there a TeX-master or tex-main-file in the local
> + ;; variables section or is it globally set to a constant
> + ;; string?
> (unless latexenc-dont-use-TeX-master-flag
> (goto-char (point-max))
> (search-backward "\n\^L" (max (- (point-max) 3000) (point-min))
> 'move)
> (search-forward "Local Variables:" nil t)
> - (when (re-search-forward
> - "^%+ *\\(TeX-master\\|tex-main-file\\): *\"\\(.+\\)\""
> - nil t)
> - (let ((file (match-string 2)))
> + (when (or (re-search-forward
> + "^%+ *\\(TeX-master\\|tex-main-file\\): *\"\\(.+\\)\""
> + nil t)
> + (and (bound-and-true-p TeX-master)
> + (stringp (default-value 'TeX-master)))
> + (and (bound-and-true-p tex-main-file)
> + (stringp (default-value 'tex-main-file))))
> + (let ((file (or (match-string 2)
> + (and (boundp 'TeX-master)
> + (default-value 'TeX-master))
> + (and (boundp 'tex-main-file)
> + (default-value 'tex-main-file)))))
> (dolist (ext `("" ,(if (boundp 'TeX-default-extension)
> (concat "." TeX-default-extension)
> "")
LGTM.
This said, I don't think we need `default-value`.
And we can presumably simplify the above to
(let ((file (if (re-search-forward
"^%+ *\\(TeX-master\\|tex-main-file\\): *\"\\(.+\\)\""
nil t)
(match-string 2)
(or (bound-and-true-p TeX-master)
(bound-and-true-p tex-main-file)))))
(when (stringp file)
(dolist ...)))
- Stefan
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#78841
; Package
auctex
.
(Sun, 29 Jun 2025 09:35:02 GMT)
Full text and
rfc822 format available.
Message #44 received at 78841 <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
> LGTM.
Thanks.
> This said, I don't think we need `default-value`. And we can
> presumably simplify the above to
>
> (let ((file (if (re-search-forward
> "^%+ *\\(TeX-master\\|tex-main-file\\): *\"\\(.+\\)\""
> nil t)
> (match-string 2)
> (or (bound-and-true-p TeX-master)
> (bound-and-true-p tex-main-file)))))
> (when (stringp file)
> (dolist ...)))
Yes, you're right. And while we're at it, I also think we should
change:
(search-forward "Local Variables:" nil t)
to
(re-search-forward "^%+ *Local Variables:" nil t)
WDYT? I'd install this change:
--8<---------------cut here---------------start------------->8---
diff --git a/lisp/international/latexenc.el b/lisp/international/latexenc.el
index 1b735810ee4..fea5be6dbd7 100644
--- a/lisp/international/latexenc.el
+++ b/lisp/international/latexenc.el
@@ -144,24 +144,27 @@ latexenc-find-file-coding-system
(file-name-directory (nth 1 arg-list))
default-directory))
latexenc-main-file)
- ;; Is there a TeX-master or tex-main-file in the local variables
- ;; section?
+ ;; Is there a TeX-master or tex-main-file in the local
+ ;; variables section or is it globally set to a constant
+ ;; string?
(unless latexenc-dont-use-TeX-master-flag
(goto-char (point-max))
(search-backward "\n\^L" (max (- (point-max) 3000) (point-min))
'move)
- (search-forward "Local Variables:" nil t)
- (when (re-search-forward
- "^%+ *\\(TeX-master\\|tex-main-file\\): *\"\\(.+\\)\""
- nil t)
- (let ((file (match-string 2)))
- (dolist (ext `("" ,(if (boundp 'TeX-default-extension)
- (concat "." TeX-default-extension)
- "")
- ".tex" ".ltx" ".dtx" ".drv"))
- (if (and (null latexenc-main-file) ;Stop at first.
- (file-exists-p (concat file ext)))
- (setq latexenc-main-file (concat file ext)))))))
+ (re-search-forward "^%+ *Local Variables:" nil t)
+ (let ((file (if (re-search-forward
+ "^%+ *\\(TeX-master\\|tex-main-file\\): *\"\\(.+\\)\""
+ nil t)
+ (match-string 2)
+ (or (bound-and-true-p TeX-master)
+ (bound-and-true-p tex-main-file)))))
+ (dolist (ext `("" ,(if (boundp 'TeX-default-extension)
+ (concat "." TeX-default-extension)
+ "")
+ ".tex" ".ltx" ".dtx" ".drv"))
+ (if (and (null latexenc-main-file) ;Stop at first.
+ (file-exists-p (concat file ext)))
+ (setq latexenc-main-file (concat file ext))))))
;; try tex-modes tex-guess-main-file
(when (and (not latexenc-dont-use-tex-guess-main-file-flag)
(not latexenc-main-file))
--8<---------------cut here---------------end--------------->8---
Best, Arash
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#78841
; Package
auctex
.
(Wed, 02 Jul 2025 11:49:03 GMT)
Full text and
rfc822 format available.
Message #47 received at 78841 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Independently of latexenc (which should be fixed, yes), here's a patch
that gets rid of the heuristic in reftex. I still believe that this
simplifies things, doesn't matter at all performance-wise, and gets rid
of numerous corner cases in which the heuristic won't work, some of
which are in my previous email:
> * latexenc-dont-use-TeX-master-flag is t
> * latexenc will be removed or changed in the future
> * the \addbibresource commands is not in the same file as
> \usepackage{biblatex}
If you think that's a good idea, then let me know and I'll write a
proper commit message.
Best,
Tim
On Sun, 2025-06-29 at 11:34 +0200, Arash Esbati wrote:
> Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>
> > LGTM.
>
> Thanks.
>
> > This said, I don't think we need `default-value`. And we can
> > presumably simplify the above to
> >
> > (let ((file (if (re-search-forward
> > "^%+ *\\(TeX-master\\|tex-main-
> > file\\): *\"\\(.+\\)\""
> > nil t)
> > (match-string 2)
> > (or (bound-and-true-p TeX-master)
> > (bound-and-true-p tex-main-file)))))
> > (when (stringp file)
> > (dolist ...)))
>
> Yes, you're right. And while we're at it, I also think we should
> change:
>
> (search-forward "Local Variables:" nil t)
>
> to
>
> (re-search-forward "^%+ *Local Variables:" nil t)
>
> WDYT? I'd install this change:
>
> --8<---------------cut here---------------start------------->8---
> diff --git a/lisp/international/latexenc.el
> b/lisp/international/latexenc.el
> index 1b735810ee4..fea5be6dbd7 100644
> --- a/lisp/international/latexenc.el
> +++ b/lisp/international/latexenc.el
> @@ -144,24 +144,27 @@ latexenc-find-file-coding-system
> (file-name-directory (nth 1
> arg-list))
> default-directory))
> latexenc-main-file)
> - ;; Is there a TeX-master or tex-main-file in the local
> variables
> - ;; section?
> + ;; Is there a TeX-master or tex-main-file in the local
> + ;; variables section or is it globally set to a constant
> + ;; string?
> (unless latexenc-dont-use-TeX-master-flag
> (goto-char (point-max))
> (search-backward "\n\^L" (max (- (point-max) 3000)
> (point-min))
> 'move)
> - (search-forward "Local Variables:" nil t)
> - (when (re-search-forward
> - "^%+ *\\(TeX-master\\|tex-main-file\\):
> *\"\\(.+\\)\""
> - nil t)
> - (let ((file (match-string 2)))
> - (dolist (ext `("" ,(if (boundp 'TeX-default-
> extension)
> - (concat "." TeX-default-
> extension)
> - "")
> - ".tex" ".ltx" ".dtx" ".drv"))
> - (if (and (null latexenc-main-file) ;Stop at
> first.
> - (file-exists-p (concat file ext)))
> - (setq latexenc-main-file (concat file
> ext)))))))
> + (re-search-forward "^%+ *Local Variables:" nil t)
> + (let ((file (if (re-search-forward
> + "^%+ *\\(TeX-master\\|tex-main-
> file\\): *\"\\(.+\\)\""
> + nil t)
> + (match-string 2)
> + (or (bound-and-true-p TeX-master)
> + (bound-and-true-p tex-main-file)))))
> + (dolist (ext `("" ,(if (boundp 'TeX-default-
> extension)
> + (concat "." TeX-default-
> extension)
> + "")
> + ".tex" ".ltx" ".dtx" ".drv"))
> + (if (and (null latexenc-main-file) ;Stop at first.
> + (file-exists-p (concat file ext)))
> + (setq latexenc-main-file (concat file
> ext))))))
> ;; try tex-modes tex-guess-main-file
> (when (and (not latexenc-dont-use-tex-guess-main-file-
> flag)
> (not latexenc-main-file))
> --8<---------------cut here---------------end--------------->8---
>
> Best, Arash
[0001-reftex-Remove-heuristics-to-detect-biblatex.patch (text/x-patch, attachment)]
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#78841
; Package
auctex
.
(Fri, 04 Jul 2025 13:08:02 GMT)
Full text and
rfc822 format available.
Message #50 received at 78841 <at> debbugs.gnu.org (full text, mbox):
Tim Ruffing <dev <at> real-or-random.org> 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
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#78841
; Package
auctex
.
(Fri, 04 Jul 2025 13:47:02 GMT)
Full text and
rfc822 format available.
Message #53 received at 78841 <at> debbugs.gnu.org (full text, mbox):
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
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#78841
; Package
auctex
.
(Mon, 07 Jul 2025 17:31:02 GMT)
Full text and
rfc822 format available.
Message #56 received at 78841 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi Arash,
> I installed my proposed change incl. comments from Stefan with commit
> 22daed7c.
With this commit, when I try to open any .tex file (existing or not), I
get "(wrong-type-argument sequencep t)" errors like those in the
attached backtrace (reproduced with emacs -Q). My TeX-master value is
t. The patch below seems to do the trick (but I'll confess that I
haven't studied the "big picture" here).
Paul
[Message part 2 (text/x-patch, inline)]
diff --git a/lisp/international/latexenc.el b/lisp/international/latexenc.el
index fea5be6dbd7..f7dd1452ca0 100644
--- a/lisp/international/latexenc.el
+++ b/lisp/international/latexenc.el
@@ -158,13 +158,14 @@ latexenc-find-file-coding-system
(match-string 2)
(or (bound-and-true-p TeX-master)
(bound-and-true-p tex-main-file)))))
- (dolist (ext `("" ,(if (boundp 'TeX-default-extension)
- (concat "." TeX-default-extension)
- "")
- ".tex" ".ltx" ".dtx" ".drv"))
- (if (and (null latexenc-main-file) ;Stop at first.
- (file-exists-p (concat file ext)))
- (setq latexenc-main-file (concat file ext))))))
+ (when (stringp file)
+ (dolist (ext `("" ,(if (boundp 'TeX-default-extension)
+ (concat "." TeX-default-extension)
+ "")
+ ".tex" ".ltx" ".dtx" ".drv"))
+ (if (and (null latexenc-main-file) ;Stop at first.
+ (file-exists-p (concat file ext)))
+ (setq latexenc-main-file (concat file ext)))))))
;; try tex-modes tex-guess-main-file
(when (and (not latexenc-dont-use-tex-guess-main-file-flag)
(not latexenc-main-file))
[debug.txt (text/plain, attachment)]
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#78841
; Package
auctex
.
(Mon, 07 Jul 2025 18:46:02 GMT)
Full text and
rfc822 format available.
Message #59 received at 78841 <at> debbugs.gnu.org (full text, mbox):
Hi Paul,
"Paul D. Nelson" <ultrono <at> gmail.com> writes:
> With this commit, when I try to open any .tex file (existing or not), I
> get "(wrong-type-argument sequencep t)" errors like those in the
> attached backtrace (reproduced with emacs -Q). My TeX-master value is
> t. The patch below seems to do the trick
Thanks for raising this. You're right, I missed to cater for that case.
I think the following change fixes this and is more concise. Can you
install it locally and give it a roll? TIA.
--8<---------------cut here---------------start------------->8---
diff --git a/lisp/international/latexenc.el b/lisp/international/latexenc.el
index fea5be6dbd7..9955c0fb569 100644
--- a/lisp/international/latexenc.el
+++ b/lisp/international/latexenc.el
@@ -156,7 +156,8 @@ latexenc-find-file-coding-system
"^%+ *\\(TeX-master\\|tex-main-file\\): *\"\\(.+\\)\""
nil t)
(match-string 2)
- (or (bound-and-true-p TeX-master)
+ (or (and (bound-and-true-p TeX-master)
+ (stringp TeX-master))
(bound-and-true-p tex-main-file)))))
(dolist (ext `("" ,(if (boundp 'TeX-default-extension)
(concat "." TeX-default-extension)
--8<---------------cut here---------------end--------------->8---
> (but I'll confess that I haven't studied the "big picture" here).
No worries, same here.
Best, Arash
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#78841
; Package
auctex
.
(Mon, 07 Jul 2025 18:56:01 GMT)
Full text and
rfc822 format available.
Message #62 received at 78841 <at> debbugs.gnu.org (full text, mbox):
Hi Arash,
> Thanks for raising this. You're right, I missed to cater for that case.
> I think the following change fixes this and is more concise. Can you
> install it locally and give it a roll? TIA.
Works fine for me.
Thanks, best,
Paul
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#78841
; Package
auctex
.
(Mon, 07 Jul 2025 19:35:01 GMT)
Full text and
rfc822 format available.
Message #65 received at 78841 <at> debbugs.gnu.org (full text, mbox):
"Paul D. Nelson" <ultrono <at> gmail.com> writes:
> Works fine for me.
Thanks for your quick response. I pushed that change (commit db46d5e8).
Best, Arash
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#78841
; Package
auctex
.
(Thu, 10 Jul 2025 15:52:04 GMT)
Full text and
rfc822 format available.
Message #68 received at 78841 <at> debbugs.gnu.org (full text, mbox):
Tim Ruffing <dev <at> real-or-random.org> 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
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#78841
; Package
auctex
.
(Fri, 11 Jul 2025 06:59:01 GMT)
Full text and
rfc822 format available.
Message #71 received at 78841 <at> debbugs.gnu.org (full text, mbox):
On Thu, 2025-07-10 at 17:50 +0200, Arash Esbati wrote:
> 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 agree that changing latexenc-dont-use-TeX-master-flag is obscure but
the other case "the \addbibresource commands is not in the same file as
\usepackage{biblatex}" is a not really a corner case. It's perfectly
valid use case.
But yes, I can understand that you're conservative about changing old
code. I promise that is my last attempt to convince you. :)
> 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.
Ok, if that's your primary concern, then I don't think it's real. This
is the output of bibtex when I put your example in test.tex (and
similar for bibtexu and bibtex8):
```
This is BibTeX, Version 0.99d (TeX Live 2026/dev/Arch Linux)
The top-level auxiliary file: test.aux
The style file: plain.bst
Illegal, another \bibdata command---line 4 of file test.aux
: \bibdata
: {biblatex-bib2}
I'm skipping whatever remains of this command
I found no \citation commands---while reading file test.aux
Database file #1: biblatex-bib1.bib
(There were 2 error messages)
```
So even compilation will give you an error. I don't think that the user
will expect RefTeX to work on invalid documents.
Or more pragmatically speaking: If you use bibtex and have two
\bibliography command, you get a meaningful error message. If you use
biblatex and run into the bug that the second bibfile is not used,
because the \addbibresource command is not in the same file as
\usepackage{biblatex}, then you have no idea what's going on.
Best,
Tim
This bug report was last modified 29 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.