V2 migration: newly created files do not show up in org-roam-node-insert/find

I’ve just updated, following the nice Hitchiker’s guide. Almost everything seems to work now except:

  1. create a new note with org-roam-node-find newname
  2. finalize capture with C-c C-c
  3. go to any other org file and org-roam-node-insert OR org-roam-node-find
  4. type the beginning of the newname
    the file doesn’t show.
    Is something wrong on my config?
    I just ran org-roam-setup with M-x and this solves it, but it doesn’t say anywhere where to put this in my config. After all the config options have been set, simply add a (org-roam-setup)?
    It would be great if some example configs with the newest settings were available for stealing :slight_smile:

Make sure you have saved the file? Not just completing capture. DB update happens as part of buffer save.

Hey @japhir, I’ve been using the following custom command (which I got, I think, from the Hitchhiker’s guide) to start org-roam v2:

;; org-roam V2 testing, load manually
(defun my/org-roam-load ()
  (add-to-list 'load-path "/Users/rberaldo/.emacs.d/org-roam-v2/")
  (load-library "org-roam")
  (setq org-roam-directory (file-truename "/Users/rberaldo/conhecimento/"))
  (setq org-roam-dailies-directory (file-truename "/Users/rberaldo/conhecimento/fleeting-notes/"))
  (setq org-roam-file-extensions '("org"))
  (define-key global-map (kbd "C-c r /") #'org-roam-node-find)
  (define-key global-map (kbd "C-c r c") #'org-roam-capture)
  (define-key global-map (kbd "C-c r i") #'org-roam-node-insert)
  (define-key global-map (kbd "C-c r r") #'org-roam-buffer-toggle)
  (define-key global-map (kbd "C-c r j") #'org-roam-dailies-capture-today)
  (define-key global-map (kbd "C-c r t") #'org-roam-dailies-find-today)
  (smartparens-global-mode t)
  (setq company-minimum-prefix-length 1)
  (setq company-idle-delay 0.25)
  (add-to-list 'company-backends 'company-capf)
  (setq org-roam-completion-ignore-case 1))
(put 'dired-find-alternate-file 'disabled nil)

Notice the org-roam-setup call in the middle there. It is in fact necessary to call it, and you can stop org-roam by running org-roam-teardown.

Hope I helped!

Looks like just adding (org-roam-setup) to my config solved this, as files are autosaved after capturing/exiting evil normal mode in my config. Cheers for the input.

I guess more examples of new configs with org-roam v2 would still be nice to see! I.e. I couldn’t find @Jethro’s emacs config in his .dots repo anymore, and his old .emacs.d repo hasn’t been updated in a while.

EDIT: I was blind and couldn’t find it because he has his stuff in .doom.d/ in stead of .emacs.d/.