`open notes` in `org-roam-bibtex` does not work

In an org-roam file, I add a citation, then I enter it and choose the 3rd option of Add Notes but I don’t get a new file opening for note taking.
This is the message I see in the messages:
org-ref-notes-function-one-file: org-ref-bibliography-notes is not set to anything
How can I fix it?

Could you show you’re complete config for org-ref ?
You need to have something like

org-ref-bibliography-notes '("~/Biblio/Notes.org")

1 Like

@roi.holtzman Hi! I assume you mean org-roam-bibtex. This is most likely because org-roam-bibtex package is not loaded/is not loaded correctly. Try running interactively M-x load-package org-roam-bibtex and then running M-x org-roam-bibtex-mode. If that doesn’t help, then unfortunately I can’t help you either, unless you provide more details about your Emacs configuration related to org-roam-bibtex.

1 Like

I do not have this variable org-ref-bibliography-notes set at all :confused: (I’m quite new to emacs and org-mode…)
From what I understand, this would be the file where all my notes on references will saved?
Is there an option to have each note-on-reference to have a separate file in the org roam folder?

My user-config is:

(require 'org-ref)

(autoload 'helm-bibtex "helm-bibtex" "" t)
(setq bibtex-completion-bibliography
      '("~/Dropbox/PHD/papers/references.bib"))

(require 'org-roam-bibtex)
(add-hook 'after-init-hook #'org-roam-bibtex-mode)
(define-key org-roam-bibtex-mode-map (kbd "C-c n a") #'orb-note-actions)

To use org-roam bibtex you a config like this

(setq org-ref-notes-function 'orb-edit-notes)
(setq org-ref-get-pdf-filename-function 'org-ref-get-pdf-filename-helm-bibtex
      bibtex-completion-pdf-field "file"
      bibtex-completion-notes-path "~/Org/roam/"
      bibtex-completion-additional-search-fields '(keywords)
      org-ref-default-citation-link "cite")

Where bibtex-completion-notes-path is the variable for the note location…

After, when you’re in helm-bibtex you can press Ctrl-z to view option and “edit notes”… it create a note with the bibtex key in #+ROAM_KEY in the folder "~/Org/roam/" (change for your destination).

More detail in this post.

1 Like

It still does not work…

Let me tell you what I am doing:

procedure 1:
I am in an org-roam note and I run helm-bibtex. Then I see the reference list that is in the main file I defined.
I press C-z and see a list of options. I go to edit notes, but nothing happens.

procedure 2:
I am in an org-roam note and I run helm-bibtex. Then I see the reference list that is in the main file I defined.
When I hit RET I get the citation in the note.
Then when I hit RET again on the note link, I get a list of options. The 3rd one is Add Notes. When I choose that, nothing happens.

@roi.holtzman

  1. Is the command org-roam-bibtex-mode available to you when hitting M-x and typing org-roam-bibtex-mode?
  2. How precisely do you install org-roam-bibtex, manually or through MELPA?
1 Like
  1. The command org-roam-bibtex-mode is not available.
  2. I installed it through MELPA.

So I guess I did something wrong…

Could you please post here all your config from the beginning of file up to the lines with org-roam-bibtex included? Strip down your personal information if any.

You mean the entire file? It is quite long…
Or maybe only the user-config part (which also has a lot of unrelated stuff)?

I now see that I did not mention I am using spacemacs…

Ok, you are using Spacemacs then?

Yes you are, sorry didn’t notice the last line.

yes.

and this is the configuration I think is relevant

(autoload 'helm-bibtex "helm-bibtex" "" t)
(setq bibtex-completion-bibliography
      '("~/Dropbox/PHD/papers/references.bib"))


;; org-raom-bibtex
(require 'org-roam-bibtex)
(add-hook 'after-init-hook #'org-roam-bibtex-mode)
(define-key org-roam-bibtex-mode-map (kbd "C-c n a") #'orb-note-actions)

(setq org-ref-notes-function 'orb-edit-notes)
(setq org-ref-get-pdf-filename-function 'org-ref-get-pdf-filename-helm-bibtex
      bibtex-completion-pdf-field "file"
      bibtex-completion-notes-path "~/Dropbox/PHD/org-roam/"
      bibtex-completion-additional-search-fields '(keywords)
      org-ref-default-citation-link "cite")

Can you load org-roam-bibtex package with M-x load-library org-roam-bibtex?

It does not appear as one of the options on the list…
Should I run it anyway?

It’s obviously some loading issues in your configuration file. Spacemacs is a complex framework and some pieces of code which you deem irrelevant may actually be relevant. I don’t use Spacemacs myself so it’s quite hard for me to figure out what’s wrong from the snippets you provided. The quickest way would be when you post your Spacemacs init.el. I could then load it and see what doesn’t work. Maybe it’s not the best idea to put the whole file contents here. It would be good if you could create a GitHub repo and share the link. You can also make the repo private and add me as a collaborator myshevchuk on GitHub.

THANKS! I have invited to as a collaborator on GitHub.

Thank you, I received the invitation

1 Like

Do you use a private org-roam layer?

I forgot about it.
I installed org-roam as stated in the documentation for spacemacs users.
So the configuration is in a file packages.el, and the content is:

(defconst org-roam-packages
  '(org-roam))

(defun org-roam/init-org-roam ()
  (use-package org-roam
    :hook
    (after-init . org-roam-mode)
    :custom
    (org-roam-directory "~/Dropbox/PHD/org-roam/")
    :init
    (progn
      (spacemacs/declare-prefix "ar" "org-roam")
      (spacemacs/set-leader-keys
        "arl" 'org-roam
        "art" 'org-roam-dailies-today
        "arf" 'org-roam-find-file
        "arg" 'org-roam-graph)

      (spacemacs/declare-prefix-for-mode 'org-mode "mr" "org-roam")
      (spacemacs/set-leader-keys-for-major-mode 'org-mode
        "rl" 'org-roam
        "rt" 'org-roam-dailies-today
        "rb" 'org-roam-switch-to-buffer
        "rf" 'org-roam-find-file
        "ri" 'org-roam-insert
        "rg" 'org-roam-graph))))


(setq org-roam-link-title-format "R:%s")

(setq org-roam-graph-viewer "/Applications/Firefox.app/Contents/MacOS/firefox")

(setq org-roam-graph-executable "/usr/local/bin/neato")
(setq org-roam-graph-extra-config '(("overlap" . "false")))


(setq org-roam-capture-templates
      '(("d" "default" plain
         (function org-roam-capture--get-point)
         "%?"
         :file-name "%<%Y%m%d%H%M%S>-${slug}"
         :head "#+TITLE: ${title}\n#+CREATED: %U\n#+LAST_MODIFIED: %U\n#+OPTIONS: toc:nil\n#+LATEX_HEADER: \\usepackage[margin=1.1in]{geometry}\n#+LATEX_HEADER: \\renewcommand{\\baselinestretch}{1.25}\n\n"
         :unnarrowed t)
        ("D" "default copy" plain
         (function org-roam-capture--get-point)
         "%?"
         :file-name "%<%Y%m%d%H%M%S>-${slug}"
         :head "#+TITLE: ${title}\n#+CREATED: %U\n#+LAST_MODIFIED: %U\n\n"
         :unnarrowed t)))