jkitchin/org-ref

Error (use-package): org-ref/:init: Symbol’s function definition is void: org-cite-register-processor

averter opened this issue · 3 comments

I am experiencing the error

Error (use-package): org-ref/:init: Symbol’s function definition is void: org-cite-register-processor

when calling org-ref with the configuration below

(use-package org-ref
  :ensure t :ensure helm :ensure ivy-bibtex :ensure helm-bibtex
  :bind (("\C-c«" . helm-bibtex)			     ; helm-bibtex
         ("\C-c )"  . org-ref-insert-link)
         ("\C-x c d" . doi-utils-add-bibtex-entry-from-doi)  ; find based on doi
         ("\C-x c n" . crossref-add-bibtex-entry))	     ; find based on name
  :init
  (setq org-ref-insert-cite-function
        (lambda ()
          (org-cite-insert nil)))
  (require 'org-ref-helm))

and it appears that calling org-ref-helm is the main cause. The org-cite-register-processor function belongs to org-ref-cite.

I am pretty sure that org-cite-register-processor is not used in org-ref anywhere. The package you reference org-ref-cite is separate from org-ref, and not one I currently maintain.

I guess the culprit could be in your :init code where you use org-cite-insert. that is a function in oc.el, which is also a separate package built in to org-mode. If org-ref is what you want to use, you should probably replace that with org-ref-cite-insert-helm

See https://github.com/jkitchin/org-ref#configuration, you probably don't need that setq line.

Thanks for the quick reply. I've tried to remove the setq line

(use-package org-ref
  :ensure t :ensure helm :ensure ivy-bibtex :ensure helm-bibtex
  :bind (("\C-c«" . helm-bibtex)			     ; helm-bibtex
         ("\C-c )"  . org-ref-insert-link)
         ("\C-x c d" . doi-utils-add-bibtex-entry-from-doi)  ; find based on doi
         ("\C-x c n" . crossref-add-bibtex-entry))	     ; find based on name
  :init
  (require 'org-ref-helm)
  )

but the same error keeps showing up when I start emacs. If I change the init to config it starts normally, however, when calling helm-bibtex the error shows up again. I've then run a debug on error while calling helm-bibtex, which resulted in the following log

Debugger entered--Lisp error: (void-function org-cite-register-processor)
  org-cite-register-processor(helm-bibtex-org-cite-follow :follow helm-bibtex-follow)
  byte-code("\300\301\302\303#\210\304\305!\207" [org-cite-register-processor helm-bibtex-org-cite-follow :follow helm-bibtex-follow provide helm-bibtex] 4)
  autoload-do-load((autoload "helm-bibtex" "Search BibTeX entries.\n\nWith a prefix ARG, the cac..." t nil) helm-bibtex)
  command-execute(helm-bibtex)

I've looked up on helm-bibtex and the org-cite-register-processor function is effectively being called but it is not defined anywhere. Do you think that helm-bibtex has a dependency of the org-ref-cite package? In any case, it does not seem to be an org-ref related issue.

It is not org-ref-cite that is the dependency, it is oc. Probably you need to (require 'oc) I guess. org-ref doesn't actually use helm-bibtex for inserting references, although it looks quite similar.

This sounds like a helm-bibtex issue. You should file an issue at https://github.com/tmalsburg/helm-bibtex/issues. Or see if https://github.com/tmalsburg/helm-bibtex#follow-processor-for-helm is helpful.