Christer Enfors <[email protected]> writes: > Matthieu Lemerre <[email protected]> writes: > >> Hi, >> When calling org-bibtex-read on a fresh emacs on a text which is not a >> .bib file, we get the following error: bibtex-parse-entry: Wrong type >> argument: stringp, nil >> >> This problem is solved if the (bibtex-set-dialect) function is called >> before. Note that this function is called automatically the first time a >> .bib file is opened, so many users may not have seen this problem. >> >> I don't know what the right fix would be though. For now I call >> (bibtex-set-dialect) in my init.el, but maybe org-bibtex-read should do it? > > Confirmed, I get the same error on my machine.
org-bibtex-read assumes that the current buffer is bibtex-mode buffer. I am not surprised that calling it outside bibtex-mode can cause all kinds of problems. I am tempted to declare the command viable only for bibtex-mode. But I can clearly see that your use case differs. Could you please explain more about why you need to call org-bibtex-read outside bibtex-mode? -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>
