# Org-roam-bibtex error "orb-insert-link: Symbol’s function definition is void: orb-helm-insert"

**URL:** <https://org-roam.discourse.group/t/org-roam-bibtex-error-orb-insert-link-symbol-s-function-definition-is-void-orb-helm-insert/2078>\
**Category:** Troubleshooting\
**Created:** [September 30, 2021, 11:43am UTC](https://org-roam.discourse.group/t/org-roam-bibtex-error-orb-insert-link-symbol-s-function-definition-is-void-orb-helm-insert/2078 "2021-09-30T11:43:45Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![wilya](https://avatars.discourse-cdn.com/v4/letter/w/94ad74/32.png) [@wilya](https://org-roam.discourse.group/u/wilya)\
**Post date:** [September 30, 2021, 11:43am UTC](https://org-roam.discourse.group/t/org-roam-bibtex-error-orb-insert-link-symbol-s-function-definition-is-void-orb-helm-insert/2078/1 "2021-09-30T11:43:46Z")

</div>

when I call orb-insert-link from a org-roam buffer, I get the following error:

```auto
orb-insert-link: Symbol’s function definition is void: orb-helm-insert

```

Please let me know if there is anything I can do to troubleshoot the issue.

This is the init.el limited to the relevant packages:

```auto
(use-package helm
  :ensure t
  :init
  (setq helm-split-window-default-side 'other)
  (helm-mode 1))

(use-package bibtex-completion
  :ensure t)

(use-package helm-bibtex
    :ensure t
    :custom
    (reftex-default-bibliography '("/Users/cfusco/Nextcloud/work/zettelkasten/bibliography/zotero.bib"))
    (bibtex-completion-pdf-field "file")
    (bibtex-completion-bibliography "/Users/cfusco/Nextcloud/work/zettelkasten/bibliography/zotero.bib")
    (bibtex-completion-library-path "/Users/cfusco/Nextcloud/zotero/storage")
    (bibtex-completion-notes-path "/Users/cfusco/Nextcloud/work/zettelkasten")
    (org-ref-get-pdf-filename-function
      '(lambda (key) (car (bibtex-completion-find-pdf key))))
    :hook
    (Tex . (lambda () (define-key Tex-mode-map "\C-ch" 'helm-bibtex))))

(use-package org-ref
    :ensure t
    :init
    (require 'org-id)
    (require 'org-ref-wos)
    (require 'org-ref-scopus)
    (require 'org-ref-pubmed)
    :custom
    (org-ref-pdf-directory "/Users/cfusco/Nextcloud/zotero/storage") 
    (org-ref-bibliography-notes "/Users/cfusco/Nextcloud/work/zettelkasten/notes.org")
    (org-ref-default-bibliography '("/Users/cfusco/Nextcloud/work/zettelkasten/bibliography/zotero.bib"))
    (bibtex-completion-pdf-open-function 'org-open-file)
    )
(use-package org-roam
  :quelpa (:upgrade t)
  :after org
  :ensure t
  :init
  (setq org-roam-v2-ack t)
  ;; for org-roam-buffer-toggle
  (add-to-list 'display-buffer-alist
               '("\\*org-roam\\*"
                 (display-buffer-in-direction)
                 (direction . right)
                 (window-width . 0.33)
                 (window-height . fit-window-to-buffer)))
  :custom
  (org-roam-directory (file-truename
                       "/Users/cfusco/Nextcloud/work/zettelkasten")) ;; file-truename handle eventual symbolic links
  (org-roam-completion-everywhere t)
  (org-roam-dailies-directory "daily/")
  (setq org-roam-dailies-capture-templates
        '(("d" "default" entry
           "* %?"
           :target (file+head "%<%Y-%m-%d>.org"
                              "#+title: %<%Y-%m-%d>\n"))))
  :hook
  (org-roam-mode . (lambda () (text-scale-adjust 1))) ;; increase the size of the side panel text
  (org-load . org-roam-db-autosync-mode) ;; starts org-roam major mode with org, org-roam-setup is an alias
  :config
  (org-roam-bibtex-mode +1) ;; starts org-roam-bibtex-mode to make Helm-bibtex use Org-roam
  (require 'org-roam-protocol)
  (defun org-roam-jump-to-index ()
    "Stub of recreating org-roam-jump-to-index from V1"
    (interactive)
    (let
        ((org-roam-index
          "/Users/cfusco/Nextcloud/work/zettelkasten/index.org"))
      (find-file org-roam-index)))
  :bind 
  (("C-c n l" . org-roam-buffer-toggle)
   ("C-c n f" . org-roam-node-find)
   ("C-c n g" . org-roam-graph)
   ("C-c n i" . org-roam-node-insert)
   ("C-c n c" . org-roam-capture)
   ("C-c n x" . org-roam-jump-to-index)
   ;; Dailies
   ("C-c n j" . org-roam-dailies-capture-today)))

(use-package org-roam-bibtex
  :quelpa (:upgrade t)
  :ensure t
  :requires bibtex-completion
  :after (org-roam)
  :bind (:map org-mode-map
              (("C-c n a" . orb-note-actions)
               ("C-c n k" . orb-insert-link)))
  :config
  (require 'org-ref) ; optional: if Org Ref is not loaded anywhere else, load it here
  (setq orb-note-actions-frontend 'helm)
  (setq orb-insert-interface 'helm-bibtex)
  (setq orb-autokey-format "%a%y")
  (setq orb-preformat-keywords
        '("citekey" "title" "url" "author-or-editor" "keywords" "file")
        orb-process-file-keyword t
        orb-file-field-extensions '("pdf"))
  (setq org-roam-capture-templates
        '(("d" "default" plain
           "%?"
           :target (file+head "${slug}.org"
                              "#+title: ${title}\n")
           :immediate-finish t
           :unnarrowed t)
          ("r" "reference" plain
           "%?"
           :target
           (file+head "${citekey}.org"
                      "#+TITLE: ${author-or-editor-abbrev} (${date}) ${title}.\n#+ROAM_REF: ${ref}\n#FILETAGS: \"bibliography\"\n#+STARTUP: content\n\n")
           :unnarrowed t)
          ("n" "bibliography reference + noter" plain  
           (file "/Users/cfusco/Nextcloud/work/zettelkasten/templates/orb-capture-template.org") ;;; exclusive for ORB-Capture, not org-roam capture
           :target
           (file+head "${citekey}.org"
                      "#+TITLE: ${title}\n#+ROAM_REF: ${ref}\n#+FILETAGS: \"bibliography\"\n#+STARTUP: content\n")
           :unnarrowed t)
          )))

```

---

<div class="post-metadata">

**Author:** ![wilya](https://avatars.discourse-cdn.com/v4/letter/w/94ad74/32.png) [@wilya](https://org-roam.discourse.group/u/wilya)\
**Post date:** [September 30, 2021, 2:20pm UTC](https://org-roam.discourse.group/t/org-roam-bibtex-error-orb-insert-link-symbol-s-function-definition-is-void-orb-helm-insert/2078/2 "2021-09-30T14:20:55Z")

</div>

> [@wilya](#):
>
> ` (setq orb-insert-interface 'helm-bibtex)`

when I comment this out, I get the generic interface and everything works as expected.

EDIT: should I report it as a bug in the github repo?

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [September 30, 2021, 5:32pm UTC](https://org-roam.discourse.group/t/org-roam-bibtex-error-orb-insert-link-symbol-s-function-definition-is-void-orb-helm-insert/2078/3 "2021-09-30T17:32:31Z")

</div>

I would check the loading sequence before doing so.

Simply M-x load-library and load helm-bibtex, and try the same command.

> [@wilya](#):
>
> ```auto
> :hook
> (Tex . (lambda () (define-key Tex-mode-map "\C-ch" 'helm-bibtex
> 
> ```

:hook defers loading of helm-bibtex and it is not linked to ORB, so I guess you never load helm-bibtex before ORB.

If this is the case, you can add :command to helm-bibtex with `orb-helm-insert`; this way, helm-bibtex loads just when you call orb-helm-insert.

---

<div class="post-metadata">

**Author:** ![mshevchuk](https://avatars.discourse-cdn.com/v4/letter/m/35a633/32.png) [@mshevchuk](https://org-roam.discourse.group/u/mshevchuk)\
**Post date:** [October 1, 2021, 6:31am UTC](https://org-roam.discourse.group/t/org-roam-bibtex-error-orb-insert-link-symbol-s-function-definition-is-void-orb-helm-insert/2078/4 "2021-10-01T06:31:46Z")

</div>

@wiliya `orb-insert-interface` has a custom setter, that this simple `setq` will not work. This option should be set with Customize or using the `:custom` keyword in `use-package`:

```auto
(use-package org-roam-bibtex
  ...
 :custom (orb-insert-interface 'helm-bibtex)
  ...)

```

This is not clearly articulated in the README nor in the variable description. You can comment on it here: [orb-insert-interface customization issue · Issue #189 · org-roam/org-roam-bibtex · GitHub](https://github.com/org-roam/org-roam-bibtex/issues/189). It’ll be a reminder for me to update the docs.

---

<div class="post-metadata">

**Author:** ![wilya](https://avatars.discourse-cdn.com/v4/letter/w/94ad74/32.png) [@wilya](https://org-roam.discourse.group/u/wilya)\
**Post date:** [October 1, 2021, 9:19am UTC](https://org-roam.discourse.group/t/org-roam-bibtex-error-orb-insert-link-symbol-s-function-definition-is-void-orb-helm-insert/2078/5 "2021-10-01T09:19:03Z")

</div>

unfortunately orb-helm-insert is not defined, neither by adding to use-package the :custom section as suggested by @mshevchuk , nor by loading helm-bibtex with load-library as suggested by @nobiot .

As a newbie, is there some trick I could use to log all the events and try to debug this problem?

---

<div class="post-metadata">

**Author:** ![mshevchuk](https://avatars.discourse-cdn.com/v4/letter/m/35a633/32.png) [@mshevchuk](https://org-roam.discourse.group/u/mshevchuk)\
**Post date:** [October 1, 2021, 10:49am UTC](https://org-roam.discourse.group/t/org-roam-bibtex-error-orb-insert-link-symbol-s-function-definition-is-void-orb-helm-insert/2078/6 "2021-10-01T10:49:31Z")

</div>

@wilya sorry, my bad. I thought I’d already fixed it. Anyway, it is now fixed in the latest commit. Please update ORB and restart Emacs. It may take a couple of hours until the changes reach MELPA though. You’ll be able to use the `:custom` keyword as described above.

---

<div class="post-metadata">

**Author:** ![wilya](https://avatars.discourse-cdn.com/v4/letter/w/94ad74/32.png) [@wilya](https://org-roam.discourse.group/u/wilya)\
**Post date:** [October 1, 2021, 11:29am UTC](https://org-roam.discourse.group/t/org-roam-bibtex-error-orb-insert-link-symbol-s-function-definition-is-void-orb-helm-insert/2078/7 "2021-10-01T11:29:58Z")

</div>

> [@mshevchuk](#):
>
> @wilya sorry, my bad. I thought I’d already fixed it.

Are you kidding? You are doing a fantastic work! Now it works, perfectly! Thank you so much.

Question, I also set in :custom orb-note-actions-frontend and it seems to work; is this all right:

```auto
        :custom
        (orb-insert-interface 'helm-bibtex)
        (orb-note-actions-frontend 'helm)

```

or should assigne helm to orb-note-frontend with setq?

---

<div class="post-metadata">

**Author:** ![mshevchuk](https://avatars.discourse-cdn.com/v4/letter/m/35a633/32.png) [@mshevchuk](https://org-roam.discourse.group/u/mshevchuk)\
**Post date:** [October 1, 2021, 7:39pm UTC](https://org-roam.discourse.group/t/org-roam-bibtex-error-orb-insert-link-symbol-s-function-definition-is-void-orb-helm-insert/2078/8 "2021-10-01T19:39:17Z")

</div>

> [@wilya](#):
>
> Are you kidding? You are doing a fantastic work! Now it works, perfectly! Thank you so much.

Thank you!

> [@wilya](#):
>
> or should assigne helm to orb-note-frontend with setq?

Technically, only one of those must be set with Customize, the other one can be set with `setq`. In fact, you can do `(require 'orb-helm)` and then set both with `setq` (this is basically what the custom setter does). For the sake of logical consistency I’d suggest to set both as you did it above or whatever you prefer.
