[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
org-bibtex-yank failing with error Wrong type argument: stringp, nil
From: |
J. G. |
Subject: |
org-bibtex-yank failing with error Wrong type argument: stringp, nil |
Date: |
Fri, 11 Aug 2023 16:34:31 +0000 (UTC) |
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:
https://stackoverflow.com/questions/31174281/org-bibtex-yank-fails-with-wrong-type-argument-stringp-nil
On my system I am using a fresh Ubuntu 23.04 VM with the following emacs and
org-mode build info:
GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.37, cairo
version 1.16.0) of 2023-08-11
Org mode version 9.7-pre (release_9.6.7-652-gcfea24 @ /home/test/org-mode/lisp/)
My backtrace is very similar to that posted in the stackoverflow thread:
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
looking-at(nil)
bibtex-parse-entry()
org-bibtex-read()
org-bibtex-yank()
funcall-interactively(org-bibtex-yank)
call-interactively(org-bibtex-yank record nil)
command-execute(org-bibtex-yank record)
execute-extended-command(nil "org-bibtex-yank" nil)
funcall-interactively(execute-extended-command nil "org-bibtex-yank" nil)
call-interactively(execute-extended-command nil nil)
command-execute(execute-extended-command)
My steps to reproduce, with this as my init.el file:
(add-to-list 'load-path "~/org-mode/lisp")
(require 'org-loaddefs)
1. Open test.org in emacs.
2. Copy a bibtex entry in Firefox, for example this entry from Google Scholar:
@article{dominik2004org,
title={Org Mode Manual},
author={Dominik, Carsten},
year={2004}
}
3. In the org file call M-x org-bibtex-yank.
After that I experience the failure above 100% of the time.
Attempts to troubleshoot:
One of the comments in the stackoverflow thread mentioned that a reason this
could have failed was that the variable "bibtex-dialect" wasn't set. C-h v
confirms it was set in my case (to "BibTeX"), but the problem was still
present. I added a line in my init.el file "(setq bibtex-dialect 'biblatex)"
just to double check and the problem was still present.
As described in the same comment, with my original 2 line init.el file above,
1. simply opening a new file "dummy.bib" (doing nothing with it),
2. then opening "test.org",
3. copying a bibtex entry in Firefox,
4. calling org-bibtex-yank
caused org-bibtex-yank to correctly function. I did not need to call
bibtex-set-dialect as the comment described.
- org-bibtex-yank failing with error Wrong type argument: stringp, nil,
J. G. <=
- Re: org-bibtex-yank failing with error Wrong type argument: stringp, nil, J. G., 2023/08/12
- Re: org-bibtex-yank failing with error Wrong type argument: stringp, nil, Ihor Radchenko, 2023/08/13
- Re: org-bibtex-yank failing with error Wrong type argument: stringp, nil, Jeremias Gonzalez, 2023/08/13
- Re: org-bibtex-yank failing with error Wrong type argument: stringp, nil, Ihor Radchenko, 2023/08/13
- Re: org-bibtex-yank failing with error Wrong type argument: stringp, nil, Jeremias Gonzalez, 2023/08/13
- Re: org-bibtex-yank failing with error Wrong type argument: stringp, nil, Ihor Radchenko, 2023/08/13