all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Richard Copley <rcopley@gmail.com>
To: 37957@debbugs.gnu.org, winkler@gnu.org
Subject: bug#37957: BibTeX dialect not set if local variables disabled
Date: Mon, 28 Oct 2019 09:44:15 +0000	[thread overview]
Message-ID: <CAPM58ojcACvgCNGobOHHj9DvpwvHbWW0XRzPxjQtpTviGQjw7A@mail.gmail.com> (raw)

[-- 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 --]

             reply	other threads:[~2019-10-28  9:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-28  9:44 Richard Copley [this message]
2019-10-28 15:16 ` bug#37957: BibTeX dialect not set if local variables disabled 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPM58ojcACvgCNGobOHHj9DvpwvHbWW0XRzPxjQtpTviGQjw7A@mail.gmail.com \
    --to=rcopley@gmail.com \
    --cc=37957@debbugs.gnu.org \
    --cc=winkler@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.