unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#37957: BibTeX dialect not set if local variables disabled
@ 2019-10-28  9:44 Richard Copley
  2019-10-28 15:16 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 12+ messages in thread
From: Richard Copley @ 2019-10-28  9:44 UTC (permalink / raw)
  To: 37957, winkler

[-- Attachment #1: Type: text/plain, Size: 1070 bytes --]

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@gnu.org>
AuthorDate: Sat Jan 28 12:06:10 2012 -0600

lisp/textmodes/bibtex.el: allow bibtex-dialect as file-local variable
(Bug#10254)

[-- Attachment #2: Type: text/html, Size: 1279 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-12-02 19:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-28  9:44 bug#37957: BibTeX dialect not set if local variables disabled Richard Copley
2019-10-28 15:16 ` Lars Ingebrigtsen
     [not found]   ` <CAPM58og0EX6F9vpVfq4fnVK-QWevXYUccf5_W_QbTLZ=iGxDuQ@mail.gmail.com>
2019-10-28 16:21     ` Lars Ingebrigtsen
2019-10-28 16:33       ` Richard Copley
2019-10-28 16:42         ` Lars Ingebrigtsen
2019-10-28 17:55           ` Richard Copley
2019-10-29 11:24             ` Lars Ingebrigtsen
2019-10-28 18:54           ` Eli Zaretskii
2019-10-29  1:52   ` Roland Winkler
2019-10-30 16:32     ` Richard Copley
2019-10-30 18:21       ` Roland Winkler
2020-12-02 19:54         ` Roland Winkler

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).