emacs - org-bibtex-yank fails with Wrong type argument: stringp, nil -
org 8.2.10 emacs 24.4.1
i have bibtex entry in scratch buffer, m-w entry.
it's in kill-ring
i swap org-mode buffer , try
m org-bibtex-yank
i receive error: wrong type argument: stringp, nil
i've toggled-debug-on-error , backtrace below. have checked entry on kill-ring - can yank scratch buffer.
i've set debug-on-entry org-bibtex-yank, , went long way down rabbit hole! can see entry in steps of debugger, got lost!
i'd grateful pointers on either problem, or getting more information might help.
thanks
debugger entered--lisp error: (wrong-type-argument stringp nil) looking-at(nil) bibtex-parse-entry() org-bibtex-read() org-bibtex-yank() call-interactively(org-bibtex-yank record nil) command-execute(org-bibtex-yank record) execute-extended-command(nil "org-bibtex-yank") smex-read-and-run(("toggle-debug-on-error" "org-bibtex-yank" "debug-on-entry" "describe-function" "apropos" "set-variable" "package-list-packages" "load-theme" "describe-variable" "bibtex-yank" "eshell" "package-refresh-contents" "yank" "org-mode" "org-bibtex" "flyspell-mode" "server-force-delete" "org-bibtex-read-buffer" "r" "s" "s+" "cd" "dm" "5x5" "s+3" "s+6" "sas" "arp" "dbx" "dig" "erc" "ert" "eww" "ftp" "gdb" "irc" "jdb" "man" "mpc" "pdb" "pwd" "rsh" "sdb" "xdb" "sqpe" "calc" "diff" "dirs" "ffap" "gnus" ...)) smex() call-interactively(smex nil nil) command-execute(smex)
i know issue "org-bibtex-yank fails wrong type argument: stringp, nil". can't paste bibtex-entry web , paste org file via org-bibtex-yank
.
my current work around:
- open in emacs buffer bibtex mode. may use dummy.bib
- in bibtex-mode buffer call m-x bibtex-set-dialect
- choose either bibtex or biblatex
now paste bibtex-entry bib-file , check behavior: - mark , copy via m-w bibentry in bibtex-mode buffer - change org file - use there m-x org-bibtex-yank.
typically works.
the issue seems bibtex-parse-entry requires bibtex-set-dialect called before calling it.
unfortunately can't (simple) file variable in bibtex file. m-x add-file-local-variable variable bibtex , value either bibtex or biblatex won't work. bibtex.el not support this.
try in org file
# local variables: # eval: (bibtex-set-dialect 'biblatex) # end:
try in bibtex file
m-x add-file-local-variable
and replace line
bibtex: biblatex
by
eval: (bibtex-set-dialect 'biblatex)
or read:
Comments
Post a Comment