org-roam / org-roam-bibtex

Org Roam integration with bibliography management software
GNU General Public License v3.0
568 stars 47 forks source link

Org-roam v2 upgrade: Cannot open load file: No such file or directory, org-roam-buffer #200

Open Wheest opened 3 years ago

Wheest commented 3 years ago

Describe the bug I just updated my Doom Emacs and migrated to Org-roam v2. When I run orb-insert-link I get the error: Cannot open load file: No such file or directory, org-roam-buffer

Expected behaviour I expected to see the typical behaviour of orb-insert-link.

ORB configuration

I note on the README that it tells us to look at the manual to ensure that our ORB configs are updated for org-roam-v2.

However I am not seeing anything in my config that looks out of the ordinary, nor any "migration tips" in the manual.

(use-package! org-roam-bibtex
  :after org-roam
  :hook (org-roam-mode . org-roam-bibtex-mode)
  :config
  (require 'org-ref)
  (require 'ivy-bibtex)
  (setq orb-insert-interface 'ivy-bibtex)
  (setq  bibtex-completion-pdf-field "file")
  )

(setq orb-preformat-keywords '("citekey" "author" "date" "year" "keywords" "booktitle" "file"))

(setq orb-templates
      '((\"r\" \"reference\" plain (function org-roam-capture--get-point)
         "\n#+ROAM_KEY: cite:%^{citekey}%?
:AUTHOR: %^{author}
:DATE: %^{date}
:YEAR: %^{year}
#+CREATED: <%<%Y-%m-%d %H:%M:%S>>
:BOOKTITLE: %^{booktitle}
#+ROAM_TAGS: %^{keywords}
#+SOURCE: %^{file}
[[file:%^{file}][Source file]]
"
         :file-name "references/${citekey}"
         :head "#+TITLE: ${title}"
         :unnarrowed t)))

Environment (please complete the following information):

myshevchuk commented 3 years ago

Hi,

the following should work:

Configure ORB with use-package (from README):

(use-package! org-roam-bibtex
  :after org-roam
  :config
  (require 'org-ref)) ; optional: if Org Ref is not loaded anywhere else, load it here

Use org-roam-capture-templates (from Orb-manual):

(setq org-roam-capture-templates
      '(;; ... other templates
        ;; bibliography note template
        ("r" "bibliography reference" plain "%?"
        :if-new
        (file+head "references/${citekey}.org" "#+title: ${title}\n")
        :unnarrowed t)))

Make sure you upgraded ORB in Doom.

Please, check the Discourse group first before opening a new GitHub issue. Please consult the README section Getting Help for further details.

Wheest commented 3 years ago

Thank you, I have moved the discussion to this discourse discussion

myshevchuk commented 3 years ago

I'll need to add a README instruction on how to start org-roam-bibtex-mode automatically.

For your case, putting the following in config.el is appropriate:

(after! org-roam
  (org-roam-bibtex-mode))