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: "Paul D. Nelson" <ultrono <at> gmail.com>
To: Arash Esbati <arash <at> gnu.org>
Cc: arne <at> arnested.dk, dev <at> real-or-random.org, 78841 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
Subject: bug#78841: reftex-get-bibfile-list fails to detect biblatex if there's no buffer for the main file
Date: Mon, 07 Jul 2025 19:30:47 +0200
[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)]

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.