# Problems with capturing new notes in orb from Helm

**URL:** <https://org-roam.discourse.group/t/problems-with-capturing-new-notes-in-orb-from-helm/1917>\
**Category:** Troubleshooting\
**Created:** [August 9, 2021, 2:40am UTC](https://org-roam.discourse.group/t/problems-with-capturing-new-notes-in-orb-from-helm/1917 "2021-08-09T02:40:58Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![danderzei](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/danderzei/32/59_2.png) [@danderzei](https://org-roam.discourse.group/u/danderzei)\
**Post date:** [August 9, 2021, 2:40am UTC](https://org-roam.discourse.group/t/problems-with-capturing-new-notes-in-orb-from-helm/1917/1 "2021-08-09T02:40:58Z")

</div>

Hi, migrated to version 2 and all is well.

However, when I try to add a new note from helm-bibtex, the capture template does not work. There is no org-id and just a title.

When I create a new note, it looks like this:

`#+TITLE: Notes on: Hawking, S. (1988): Brief History of Time`

No org-id, no roam\_refs and it ignores the capture template.

Any suggestions?

This is my config:

```auto
  ;; Org-Roam configuration
  (use-package org-roam
    :after org
    :init
    (setq org-roam-v2-ack t) ;; Acknowledge V2 upgrade
    :custom
    (org-roam-directory (file-truename "~/Documents/org-roam/"))
    :config
    (setq org-roam-db-location (concat org-roam-directory "data/org-roam.db")
          org-roam-capture-templates '(("d" "default" plain "%?"
                                        :if-new (file+head "${slug}.org"
                                                           "#+title: ${title}\n#+date: %u\n#+lastmod: \n#+startup: inlineimages latexpreview\n*topics*: \n\n")
                                        :unnarrowed t
                                        :immediate-finish t)
                                       ("r" "bibliography reference" plain "%?"
                                        :if-new (file+head "${citekey}.org"
                                                           "#+title: ${title}\n#+date: %U\n#+lastmod: \n#+startup: inlineimages latexpreview\n*topics*: \n\n${fullcite}")
                                        :unnarrowed t
                                        :immediate-finish t))
          org-roam-dailies-capture-templates '(("d" "default" entry "* %?"
                                                :if-new (file+head "%<%Y-%m-%d>.org"
                                                                   "#+title: %<%Y-%m-%d: >\n#+filetags: :Diary:\n\n"))))
    (org-roam-setup)
    :bind
    (("C-c n l" . org-roam-buffer-toggle)
     ("C-c n f" . org-roam-node-find)
     ("C-c n t" . org-roam-tag-add)
     ("C-c n a" . org-roam-alias-add)
     ("C-c n g" . org-roam-ui-mode))
    (:map org-mode-map
          (("C-c n i" . org-roam-node-insert)
           ("C-c n o" . org-id-get-create))))

  (use-package org-roam-bibtex
    :after org-roam
    :bind (:map org-mode-map ("C-c n b" . orb-note-actions))
    :config (require 'org-ref))

```

---

<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:** [August 9, 2021, 3:04pm UTC](https://org-roam.discourse.group/t/problems-with-capturing-new-notes-in-orb-from-helm/1917/2 "2021-08-09T15:04:46Z")

</div>

Hi, you must activate `org-roam-bibtex-mode`. Call this command interactively or put `(org-roam-bibtex-mode +1)` somewhere in your `init.el`, for example in the `:config` section of the `(use-package org-roam ...)` block.

---

<div class="post-metadata">

**Author:** ![danderzei](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/danderzei/32/59_2.png) [@danderzei](https://org-roam.discourse.group/u/danderzei)\
**Post date:** [August 9, 2021, 7:21pm UTC](https://org-roam.discourse.group/t/problems-with-capturing-new-notes-in-orb-from-helm/1917/3 "2021-08-09T19:21:29Z")

</div>

> [@mshevchuk](#):
>
> org-roam-bibtex-mode

Doh! That makes a lot of sense. Thanks.

---

<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:** [August 10, 2021, 3:17pm UTC](https://org-roam.discourse.group/t/problems-with-capturing-new-notes-in-orb-from-helm/1917/4 "2021-08-10T15:17:20Z")

</div>

> [@danderzei](#):
>
> `(org-roam-setup)`

I noticed that you have (org-roam-setup) in your init.el  
I just found out that org-roam-setup has been recently removed. Now we should use

```auto
(org-roam-db-autosync-mode)

```

---

<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:** [August 10, 2021, 5:04pm UTC](https://org-roam.discourse.group/t/problems-with-capturing-new-notes-in-orb-from-helm/1917/5 "2021-08-10T17:04:39Z")

</div>

@wilya Thank you for this.  
I just had a look. You could continue to use org-roam-setup; it’s now an alias for another function org-roam-db-autosync-enable, which in turn activates org-roam-db-autosync-mode.

Long story short, you can use either 🙂

---

<div class="post-metadata">

**Author:** ![danderzei](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/danderzei/32/59_2.png) [@danderzei](https://org-roam.discourse.group/u/danderzei)\
**Post date:** [August 10, 2021, 8:13pm UTC](https://org-roam.discourse.group/t/problems-with-capturing-new-notes-in-orb-from-helm/1917/6 "2021-08-10T20:13:36Z")

</div>

> [@nobiot](#):
>
> Long story short, you can use either

Thanks for pointing this out. Hard to keep up with how Org-roam is evolving.

I prefer `org-roam-setup`, it is more descriptive.

---

<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:** [August 10, 2021, 8:27pm UTC](https://org-roam.discourse.group/t/problems-with-capturing-new-notes-in-orb-from-helm/1917/7 "2021-08-10T20:27:31Z")

</div>

Same re “hard to keep up” and same with the sentiment about org-roam-setup; I have kept it, too. It’s shorter 😉

But to be honest, Jethro and Wetlize are making Herculean efforts to minimize impact on us, the users. I hadn’t noticed this change came in when I update package almost twice a day :). No impact with the recent src directory change, with this name change, with recent modularization for autoload, etc, etc,

I only got to know these via issues experienced by doom and other rather advanced users.

---

<div class="post-metadata">

**Author:** ![danderzei](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/danderzei/32/59_2.png) [@danderzei](https://org-roam.discourse.group/u/danderzei)\
**Post date:** [August 11, 2021, 7:50am UTC](https://org-roam.discourse.group/t/problems-with-capturing-new-notes-in-orb-from-helm/1917/8 "2021-08-11T07:50:00Z")

</div>

> [@nobiot](#):
>
> src directory change

What is this change about?

---

<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:** [August 11, 2021, 9:22am UTC](https://org-roam.discourse.group/t/problems-with-capturing-new-notes-in-orb-from-helm/1917/9 "2021-08-11T09:22:39Z")

</div>

Have a look at the source code directory in GitHub. Some el files are in extensions directory now. No impact on MELPA users.

---

<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:** [August 11, 2021, 11:28am UTC](https://org-roam.discourse.group/t/problems-with-capturing-new-notes-in-orb-from-helm/1917/10 "2021-08-11T11:28:42Z")

</div>

Going a bit off topic here. Be reassured that I wont keep going.

> [@nobiot](#):
>
> Have a look at the source code directory in GitHub. Some el files are in extensions directory now. No impact on MELPA users.

About that, when I updated to V2 (yesterday), I had a bizarre error on start up, concerning org-roam-protocol (something like file not found). In these cases I do the dumb man, scorched earth approach. I delete all my configuration files and start from scratch. Fortunately it is very easy to do so using an org file with all the code blocks to recreate the init file. When I did that, I realized that the error would go away using melpa, but would come back if I install org-roam from git. However, I do not use the normal procedure where I clone locally the repository, but I use _quelpa_ package, which can install from git remotely. I guess it might have been this change of file location.

Anyway, I had to stop using quelpa and the problem went away.

This is the code that initialize quelpa:

```auto
  (unless (package-installed-p 'quelpa)
    (with-temp-buffer
      (url-insert-file-contents "https://github.com/quelpa/quelpa/raw/master/quelpa.el")
      (eval-buffer)
      (quelpa-self-upgrade)))

```

And this is my org-roam configuration, where I commented out the directive to update from git:

```auto
    (use-package org-roam
;;; :quelpa ((org-roam :fetcher github :repo "org-roam/org-roam") :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"))
      (org-roam-dailies-directory "daily/")
      (org-roam-completion-everywhere t)
      :config
      (org-roam-db-autosync-mode) ;; starts org-roam, which is a major mode. org-roam-setup is an alias
      (require 'org-roam-protocol)
      :bind
      (("C-c n l" . org-roam-buffer-toggle)
       ("C-c n L" . org-roam-buffer-display-dedicated)
       ("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)
       ;; Dailies
       ("C-c n j" . org-roam-dailies-capture-today)))

```

---

<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:** [August 11, 2021, 12:00pm UTC](https://org-roam.discourse.group/t/problems-with-capturing-new-notes-in-orb-from-helm/1917/11 "2021-08-11T12:00:50Z")

</div>

> [@wilya](#):
>
> About that, when I updated to V2 (yesterday), I had a bizarre error on start up, concerning org-roam-protocol (something like file not found).

If this is the issue, it’s likely that the issue is just missing a load path.

I am assuming Quelpa downloads the sub-directory of the repo recursively at least for all `.el` files.

I think it’s simply a matter of adding the following in your org-roam part of use-package.

`:init (add-to-list 'load-path "path/to/org-roam/extensions")` – in your case, you require `org-roam-protocol` in the `:config` section, so `add-to-list` can be just before the `require` to let Emacs know where to find the library.

The end result should be something like this:

```auto
    (use-package org-roam
      :quelpa ((org-roam :fetcher github :repo "org-roam/org-roam") :upgrade t)
      :after org
      :ensure t
      :init 
      ;; It should not matter add-to-list first or setq first below
      (add-to-list 'load-path "path/to/repos/org-roam/extensions")
      (setq org-roam-v2-ack t)
     ... [rest of config continues]

```

---

<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:** [August 11, 2021, 12:26pm UTC](https://org-roam.discourse.group/t/problems-with-capturing-new-notes-in-orb-from-helm/1917/12 "2021-08-11T12:26:06Z")

</div>

Congratulations @nobiot , you hit the nail in the head! As you guessed, quelpa downloaded the git code in its configuration folder, compiled org-roam and moved the .elc files under the melpa folder. However it did not compile _extensions_. Using the add-to-list function on load-path pointed to _extensions_ in the source code, the error went away. Do you think I could have problems in terms of speed using .el files instead of .elc?

EDIT: I found a way to tell quelpa to compile also the extensions folder, but it does keep the extensions files compiled in a separate folder that needs to be included it to the load-path. Annoying because I will need to manually change the init file every time a new release is created, as the name of the folder will change. Anyhow, this is now how init.el looks like:

```auto
  (use-package org-roam
    :quelpa ((org-roam :fetcher github :repo "org-roam/org-roam" :files (:defaults "extensions")) :upgrade t)
    :after org
    :ensure t
    :init
    (add-to-list 'load-path "~/.emacs.d/elpa/org-roam-20210810.802/extensions") ;;; extension folder needs to be included in the load-path
[...] 

```

---

<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:** [August 11, 2021, 2:35pm UTC](https://org-roam.discourse.group/t/problems-with-capturing-new-notes-in-orb-from-helm/1917/13 "2021-08-11T14:35:06Z")

</div>

Just out of curiosity; I don’t use Quelpa.

Why do you opt to use a receipt, instead of simply going with `(quelpa 'org-roam)`?

I just tried `emacs -q` (no loading config) and the following script in `init.el`.

I got both the git repo under `quelpa/build` and all the org-roam’s `.el` files including the ones under extentions in a flat structure in one folder according to the MELPA recipe from Org-roam project. They are also all compiled into `.elc`.

I didn’t need to do anything extra.

I am assuming this can also automatically upgraded (?).

```auto
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(setq package-check-signature nil)
(package-refresh-contents)
(package-install 'quelpa)

(quelpa 'org-roam)

```

---

<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:** [August 11, 2021, 3:09pm UTC](https://org-roam.discourse.group/t/problems-with-capturing-new-notes-in-orb-from-helm/1917/14 "2021-08-11T15:09:29Z")

</div>

> [@nobiot](#):
>
> Why do you opt to use a receipt, instead of simply going with `(quelpa 'org-roam)` ?

because I clearly cannot read proper documentation. Thank you very much @nobiot . It works beautifully.

---

<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:** [August 11, 2021, 3:26pm UTC](https://org-roam.discourse.group/t/problems-with-capturing-new-notes-in-orb-from-helm/1917/15 "2021-08-11T15:26:41Z")

</div>

No worries. I’m glad I got to try Quelpa. I might switch to using it; I like it. Thank you.
