GNU bug report logs - #37957
BibTeX dialect not set if local variables disabled

Previous Next

Package: emacs;

Reported by: Richard Copley <rcopley <at> gmail.com>

Date: Mon, 28 Oct 2019 09:47:01 UTC

Severity: normal

Done: "Roland Winkler" <winkler <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Richard Copley <rcopley <at> gmail.com>
Subject: bug#37957: closed (Re: bug#37957: BibTeX dialect not set if local
 variables disabled)
Date: Wed, 02 Dec 2020 19:55:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#37957: BibTeX dialect not set if local variables disabled

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 37957 <at> debbugs.gnu.org.

-- 
37957: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=37957
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: "Roland Winkler" <winkler <at> gnu.org>
To: Richard Copley <rcopley <at> gmail.com>, Lars Ingebrigtsen <larsi <at> gnus.org>,
 37957-done <at> debbugs.gnu.org
Subject: Re: bug#37957: BibTeX dialect not set if local variables disabled
Date: Wed, 2 Dec 2020 13:54:00 -0600
Fixed with commit 40f42945ed1ee76c16ee4c58c7f37a412a3aa407.

[Message part 3 (message/rfc822, inline)]
From: Richard Copley <rcopley <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org, Roland Winkler <winkler <at> gnu.org>
Subject: BibTeX dialect not set if local variables disabled
Date: Mon, 28 Oct 2019 09:44:15 +0000
[Message part 4 (text/plain, inline)]
From "emacs -Q",
* Set the variable 'enable-local-variables' to nil.
* Visit a BibTeX (*.bib) file.
* Wait one minute or eval (bibtex-parse-buffers-stealthily).

Lisp error: (wrong-type-argument number-or-marker-p nil)
Backtrace:
  1+(nil)
  (buffer-substring-no-properties (1+ (match-beginning
bibtex-type-in-head)) (match-end bibtex-type-in-head))
  bibtex-type-in-head()
  (assoc-string (bibtex-type-in-head) bibtex-entry-alist t)
  [...]
  bibtex-parse-keys(t)
  bibtex-parse-buffers-stealthily()
  [...]

On visiting a BibTeX file, if enable-local-variables is nil,
'bibtex-set-dialect' doesn't get called. This causes errors later on. For
example, when 'bibtex-parse-buffers-stealthily' is called, we get the above
error, because 'bibtex-entry-head' has not been set. Glancing at the
history of  'bibtex-major-mode', this commit seems a likely candidate:

ace88aa20f32b298e7f2e8e6115b5661504f8724
Author: Roland Winkler <winkler <at> gnu.org>
AuthorDate: Sat Jan 28 12:06:10 2012 -0600

lisp/textmodes/bibtex.el: allow bibtex-dialect as file-local variable
(Bug#10254)
[Message part 5 (text/html, inline)]

This bug report was last modified 4 years and 257 days ago.

Previous Next


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