From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adam Porter Subject: org creates bibtex fontification buffers without setting dialect, causes error Date: Thu, 14 Jun 2018 21:34:07 -0500 Message-ID: <87sh5ohj6o.fsf@alphapapa.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54449) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fTeZ9-0007ZJ-Ek for emacs-orgmode@gnu.org; Thu, 14 Jun 2018 22:34:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fTeZ6-0007L6-Bj for emacs-orgmode@gnu.org; Thu, 14 Jun 2018 22:34:19 -0400 Received: from [195.159.176.226] (port=50080 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fTeZ6-0007J7-37 for emacs-orgmode@gnu.org; Thu, 14 Jun 2018 22:34:16 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1fTeWw-0002r6-PH for emacs-orgmode@gnu.org; Fri, 15 Jun 2018 04:32:02 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Hi, For a while now I've been getting "(wrong-type-argument stringp nil)" errors from a timer running bibtex-parse-buffers-stealthily. Finally I've tracked it down to an "*org-src-fontification:bibtex-mode*" buffer (which is hidden, but shows up in ibuffer by pressing "C-u g"). The backtrace was not very helpful, apparently because of some defsubsts being used, but by stepping through code with edebug, I found that the problem is that the fontification buffer is in BibTeX mode, but bibtex-set-dialect has not been called, so certain variables are not initialized in that buffer, and eventually bibtex-parse-keys fails in its defsubst bibtex-type-in-head. Calling bibtex-set-dialect fixes the problem. It seems easy enough to fix: Org should call bibtex-set-dialect in its BibTeX fontification buffer. But why has no one else has noticed this problem? It seems like this should happen to every Org user who has a BibTeX source block in an open Org buffer. Thanks.