ORB capture workflow

I was wondering how to achieve this capture workflow with ORB. I am running v2.

What I’d like is to pull up the capture window, then enter a citekey (stored in Zotero), then have the file named after the citekey and the title of the note be the title of the item in my Bibtex.

The way it works now is it seems like the ${title} refers to what I type when the initial capture window shows up.

Here is the relevant pieces of my config.el (I am running doom):

; org-roam settings
(setq org-roam-directory (format "%s/slipbox/" gdrive_path))
(use-package! org-roam
  :config
  (org-roam-setup))
(setq org-roam-capture-templates
      '(;; plain
        ("d" "default" plain "%?"
         :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org"
                            "#+title: ${title}\n")
         :unnarrowed t)
        ;; bibliography note template
        ("r" "bibliography reference" plain "%?"
         :if-new
         (file+head "references/${citekey}.org" "#+title: ${title}\n")
         :unnarrowed t)))

; org-ref settings
(setq reftex-default-bibliography (format "%s/zotero_library.bib" gdrive_path))

(setq org-ref-default-bibliography (format "%s/zotero_library.bib" gdrive_path)
      org-ref-pdf-directory (format "%s/Zotero" gdrive_path))

(after! org-ref
  (setq
   bibtex-completion-notes-path (format "%s/slipbox/" gdrive_path)
   bibtex-completion-bibliography (format "%s/zotero_library.bib" gdrive_path)
   bibtex-completion-pdf-field "file"
   ))

(use-package! org-ref
  :config
  (setq
   org-ref-completion-library 'org-ref-ivy-cite
   org-ref-get-pdf-filename-function 'org-ref-get-pdf-filename-helm-bibtex
   org-ref-default-bibliography (list (format "%s/zotero_library.bib" gdrive_path))
   org-ref-notes-directory (format "%s/slipbox/" gdrive_path)
   org-ref-notes-function 'orb-edit-notes
   ))

                                        ; org-bibtex settings
(use-package! org-roam-bibtex
  :after org-roam
  :hook (org-roam-mode . org-roam-bibtex-mode)
                                        ;:load-path (format "%s/zotero_library.bib" gdrive_path)
  :config
  (require 'org-ref)
  (require 'org-roam-protocol))

Sorry if this config is messy - I’m new to emacs and this is cobbled together from different sources!

Hi, a typical workflow for ORB is to call ivy-bibtex or similar (helm-bibtex, bibtex-actions), select a citation of interest, call the context menu (C-o in Ivy) and choose Edit notes to create a new note with all the info including title populated automatically. Alternatively, the same can also be achieved by following cite:links and choosing Open notes.

Actually, I like the idea of being able to properly run ORB from org-roam-capture, you can request a new feature on Github if you want.

As a side note not related to your issue, I’d rewrite your config as follows to make it less messy:

; org-roam settings
(setq org-roam-directory (format "%s/slipbox/" gdrive_path))
(use-package! org-roam
  :config
  (org-roam-setup)
  (setq org-roam-capture-templates
        '(;; plain
          ("d" "default" plain "%?"
           :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org"
                            "#+title: ${title}\n")
           :unnarrowed t)
          ;; bibliography note template
          ("r" "bibliography reference" plain "%?"
           :if-new
           (file+head "references/${citekey}.org" "#+title: ${title}\n")
           :unnarrowed t)))
   (org-roam-bibtex-mode))

; bibtex-completion settings
(after! bibtex-completion
  (setq bibtex-completion-notes-path (format "%s/slipbox/" gdrive_path)
        bibtex-completion-bibliography (format "%s/zotero_library.bib" gdrive_path)
        bibtex-completion-pdf-field "file"))

; org-ref settings
(use-package! org-ref
  :config
  (setq org-ref-completion-library 'org-ref-ivy-cite
        org-ref-get-pdf-filename-function 'org-ref-get-pdf-filename-helm-bibtex
        org-ref-default-bibliography (list (format "%s/zotero_library.bib" gdrive_path))
        org-ref-pdf-directory (format "%s/Zotero" gdrive_path)))

(setq reftex-default-bibliography (format "%s/zotero_library.bib" gdrive_path))

; org-roam-bibtex settings
(use-package! org-roam-bibtex
  :after org-roam
  :config
  (require 'org-ref))

;; These things were mostly harmless but conceptually wrong
;;
;; 1. You don't need `org-ref-notes-directory' if you are using `org-roam-bibtex'. It's simply not used by anything in this case.
;; 2. No need to set `org-ref-notes-function' manually (to an incorrect function). `org-roam-bibtex-mode' does it correctly.
;; 3. Hooking `org-roam-bibtex-mode' to start up with `org-roam-mode' made sense only in Org-roam v1; there is no `org-roam-mode; minor mode in v2, so `org-roam-bibtex-mode' should be started upon loading the `org-roam` package.
;; 4. Doom takes care of properly loading `org-roam-protocol'. In any case, loading it with `org-roam-bibtex` is logically wrong.
;; 5. You probably want to configure the `bibtex-completion' package after loading it, although it doesn't make a big difference.

That workflow works perfectly for me, thank you! I knew I could pull up the “add/edit notes” context menu when I had a cite:link but I couldn’t figure out how to pull up my reference list without inserting a link somewhere! Didn’t realize I could just call helm-bibtex and be off to the races.

Also, thank you so much for helping with my config! It works great :slight_smile:

1 Like

Sure!