jkitchin / org-ref

org-mode modules for citations, cross-references, bibliographies in org-mode and useful bibtex tools to go with it.
GNU General Public License v3.0
1.35k stars 242 forks source link

Missing require in doi-utils.el #1084

Closed DavidRConnell closed 11 months ago

DavidRConnell commented 11 months ago

Hi, I started getting the Symbol's function definition is void: url-insert error when using doi-utils-bibtex-entry-from-doi and I can reproduce this error using emacs -q --eval="(require 'org-ref)".

The url-insert function is in the url-handlerspackage which, is not explicitly required by doi-utils. I belive bcd59dc introduced the dependency on this function.

Solution

Adding a (require 'url-insert) to doi-utils should fix the problem.

jkitchin commented 11 months ago

weird. I wonder why this works fine for me. I can't find anywhere that library is required, I guess something else does it somewhere? I have added it in the commit above. Hopefully that fixes it for you.

DavidRConnell commented 11 months ago

Thanks (and for catching the mistake in my require). That is weird. I can consistently reproduce the problem on emacs 29.1. I assumed it wasn't an emacs version issue since I looked at the url changelog and it hasn't been modified anytime recently. So all I can think of is what you said, maybe another built in file required it and no longer does or something like that