# ORB always prompting for template capture, even if the node already exists

**URL:** <https://org-roam.discourse.group/t/orb-always-prompting-for-template-capture-even-if-the-node-already-exists/3000>\
**Category:** Troubleshooting\
**Created:** [February 27, 2023, 7:56pm UTC](https://org-roam.discourse.group/t/orb-always-prompting-for-template-capture-even-if-the-node-already-exists/3000 "2023-02-27T19:56:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![matogoro](https://avatars.discourse-cdn.com/v4/letter/m/f05b48/32.png) [@matogoro](https://org-roam.discourse.group/u/matogoro)\
**Post date:** [February 27, 2023, 7:56pm UTC](https://org-roam.discourse.group/t/orb-always-prompting-for-template-capture-even-if-the-node-already-exists/3000/1 "2023-02-27T19:56:27Z")

</div>

Hi all, I posed this on the `org-roam-bibtex` GitHub, but I thought I might also ask for help here. I use a combination of `helm-bibtex`, `org-roam`, and `org-roam-bibtex` for my ZK system.

On Emacs startup, ORB seems to not be active, despite having `org-roam-bibtex-mode` on: if I go into `helm-bibtex` and select “Edit notes,” then `helm-bibtex` will either (a) correctly navigate to the appropriate note if the note exists or (b) incorrectly try to make a `helm-bibtex` note (i.e., without `org-capture` template) if the note does not exist.

However, if I either manually restart `org-roam-bibtex-mode` (i.e., turn it off and on)—or if I invoke a function that requires `org-roam-bibtex-mode` (e.g., `orb-insert-link`), then `helm-bibtex` will try to use an `org-capture` template _every time_, regardless of whether the note is already created or not. I can work around this by just capturing a blank template whenever I navigate between notes, but this can be a bit cumbersome.

I imagine this has something to do with how these packages are loaded. I use Emacs 28.2 run as a daemon and I’ve seen similar oddities before. But I can’t really figure this one out and would really appreciate some help. My code (minus my keybindings) is below:

```auto
(use-package org-roam
  :custom
  (org-roam-directory (file-truename "~/Documents/Homework/Zettelkasten/Nodes"))
  (org-roam-completion-everywhere t)
  (org-roam-capture-templates
    `(("r" "Reference" plain
      (file "~/Documents/Homework/Zettelkasten/Templates/reference.org")
       :target (file "Reference/${citekey}.org")
       :unnarrowed t)
      ("b" "Blank Reference Workaround" plain
      (file "~/Documents/Homework/Zettelkasten/Templates/blank.org")
       :target (file "Reference/${citekey}.org")
       :unnarrowed t)))
  :config
  (setq org-roam-mode-sections
        '((org-roam-backlinks-section :unique t)
          org-roam-reflinks-section))
  (org-roam-db-autosync-mode))

(use-package org-roam-bibtex
  :after org-roam helm-bibtex
  :config
  (setq orb-preformat-keywords '("citekey" "author-or-editor-abbrev" "author-or-editor" "date" "title" "url" "keywords" "file")
        orb-process-file-keyword t
        orb-attached-file-extensions '("pdf")
        orb-insert-interface 'helm-bibtex
        orb-insert-link-description 'citekey
        orb-file-field-extensions '("pdf" "epub"))
  (org-roam-bibtex-mode 1))

```

Thank you in advance!

---

<div class="post-metadata">

**Author:** ![matogoro](https://avatars.discourse-cdn.com/v4/letter/m/f05b48/32.png) [@matogoro](https://org-roam.discourse.group/u/matogoro)\
**Post date:** [March 4, 2023, 6:54pm UTC](https://org-roam.discourse.group/t/orb-always-prompting-for-template-capture-even-if-the-node-already-exists/3000/2 "2023-03-04T18:54:33Z")

</div>

In case anyone else is having this problem, I managed to figure this out with help on the `org-roam-bibtex` GitHub.

The problem is that I was not using `org-ref`, while ORB defaults to `org-ref-v2`-style citations. Notes were therefore not being registered in the `org-roam` database, and the capture prompt for a new note was asked every time.

A way to get around this without using `org-ref` is to use `org-cite`-style citations, which comes built-in with `org`:

```auto
(use-package org-roam-bibtex
  :after org-roam
  :config
  (setq orb-preformat-keywords '("citekey" "author-or-editor-abbrev" "author-or-editor" "date" "title" "url" "keywords" "file")
        orb-process-file-keyword t
        orb-attached-file-extensions '("pdf")
        orb-insert-interface 'helm-bibtex
        orb-insert-link-description 'citekey
        orb-roam-ref-format 'org-cite
        orb-file-field-extensions '("pdf" "epub")))

(org-roam-bibtex-mode +1)

```

So everything works now. Thanks again for your help!
