emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: org-bibtex-yank failing with error Wrong type argument: stringp, nil


From: J. G.
Subject: Re: org-bibtex-yank failing with error Wrong type argument: stringp, nil
Date: Sat, 12 Aug 2023 04:15:26 +0000 (UTC)

On Friday, August 11, 2023 at 09:34:31 AM PDT, J. G. <jerzor@pacbell.net> wrote:

> Hi, I'm trying to figure out why I'm getting consistent failures using org-bibtex-yank. This appears to be identical to the problem posted here:

On further investigation I have pinpointed the precise error as referenced by the comment in the Stackoverflow thread. One of the nested function calls stemming from org-bibtex-yank is to bibtex-parse-entry in bibtex.el, and that in turn attempts to make use of the internal variable bibtex-entry-maybe-empty-head. That variable, among others, has documentation that they are nil until initialized by bibtex-set-dialect, which sets a number of other internal variables along with bibtex-dialect. That default nil value bubbles up to cause the error I am experiencing. The solution in my original email of opening a dummy.bib file works because it calls bibtex-mode and that calls bibtex-set-dialect.

Adding the following two lines to my init fixes the error in my case:

(require 'bibtex)
(bibtex-set-dialect 'biblatex nil)

where the first line seems to be necessary in my barebones case because bibtex isn't yet loaded, and the second line sets my dialect of choice (biblatex) and sets the internal variables for bibtex globally (nil), not locally (t).

Given the disconnect between the error and the solution (as I understand it at least), and the absence of this necessity in the documentation (I have read through at least ol-bibtex.el), perhaps a small mention of this in the documentation in ol-bibtex.el is in order, and I can submit a patch for review?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]