What do you think about org-ref V3?

@maikol is using this for the basic citation stuff, with the vertico module.

FWIW, this is what I was referring to earlier, to only load the org-ref cross-reference support. I don’t know how it compares to the full package though; these two files gives you the cross-reference link types and font-locking and insertion for them.

(package! org-ref :recipe (:host github
                           :repo "jkitchin/org-ref"
                           :files ("org-ref-ref-links.el" "org-ref-refproc.el")))

I’ve also had in parallel been experimenting with what it might take to add this sort of capability to org itself.

Sure. The only relevant part of my doom.d for citations is

(after! org
  (require 'oc)

  (setq org-cite-export-processors
        '((latex biblatex)
          (t csl))))


(use-package! oc-bibtex-actions
  :when (featurep! :completion vertico)
  :after oc
  :demand t
  :config

  (setq org-cite-global-bibliography '("~/Dropbox/home/documents/org/roam/_library.bib"))
  (setq bibtex-actions-bibliography org-cite-global-bibliography)
  (setq bibtex-completion-bibliography org-cite-global-bibliography)
  (setq bibtex-actions-notes-paths '("~/Dropbox/home/documents/org/roam/literature"))
  (setq org-cite-insert-processor 'oc-bibtex-actions
        org-cite-follow-processor 'oc-bibtex-actions
        org-cite-activate-processor 'oc-bibtex-actions
        ;; The activate processor relies on shift-select, so we set to t.
        org-support-shift-select t)

  (setq bibtex-actions-default-action 'bibtex-actions-open-notes)
  (setq bibtex-completion-pdf-extension '(".pdf" ".djvu")
        bibtex-completion-pdf-field "file")

  (setq orb-note-actions-interface 'ivy)

  (map! :map org-mode-map
        "C-c [" 'org-cite-insert)

  ;; Use consult-completing-read for enhanced interface.
  (advice-add #'completing-read-multiple :override #'consult-completing-read-multiple))

These are just fragments from this PR and the manual of bibtex-actions

Thank you so much…

Thanks I will update my config with this.

Awesome! It will be ideal to have org-mode as a complete typesetting system for academic (or not) documents with only built-in functions.

Hi everyone. I’m using Org Roam v2 and ORB v0.6 with Org Ref. The other day I switched to Org Ref V3, everything seems to work OK except for one thing.

When I run the command helm-bibtex, all my bib entries appear without the note symbol (✎) even if some of them do have notes. Fortunately (but strangely), selecting one of those entries and clicking on Edit notes correctly opens the corresponding note. Also, I can access the note from a file that cites that entry, and in that case hovering with the cursor on the citation (cite:Blabla2007) displays the correct information with the note symbol (if the entry has a note).

By looking at the code, I can see that bibtex-completion-find-note-functions includes orb-find-note-file, and the latter evaluates correctly on a scratch buffer with a CITEKEY that has a note. So, I’m not sure if this is a problem caused by Helm Bibtex, ORB, Org Ref v3, or by a mistaken configuration file (I followed the new instructions on the Org Ref v3 website).

Any suggestion on what I should try to do next would be much appreciated. :slight_smile:

After a few hours looking at elisp code and at my config file, I had a hunch about what might have been the problem. The hunch turned out to be correct. This is what I was doing:

  • start Emacs;
  • immediately open an org file which prompts bibtex-completion to (re)load the bibliography;
  • then activate org-roam-bibtex-mode.

This sequence of steps leads to the glitch I described in the previous post because, without org-roam-bibtex-mode on, bibtex-completion won’t use orb-find-note-file.

I guess that if I instruct Emacs to turn on org-roam-bibtex-mode immediately at startup, the glitch would be difficult to encounter.

Sorry to have cluttered this section with my predicament, this was the only thread on Org-ref v3 so I thought to post it here.

1 Like

Hi @FilTower, org-roam-bibtex-mode is just about that - tweaking some variables like bibtex-completion-find-note-functions and building its own cache to make Bibtex-completion aware of existing Org-roam literature notes. There is no way Bibtex-completion could work with Org-roam correctly without enabling org-roam-bibtex-mode first, unless you set all these things by hand of course.

You do not need to turn the mode immediately at startup however. It may even be not advisable to do so if you have a complicated Org setup - loading things that require Org early may lead to various race conditions issues, e.g. loading an incorrect version of Org if you have several installed. Typically, you’d do something like

(with-eval-after-load 'org-roam (org-roam-bibtex-mode +1))

or

(use-package org-roam
...
:config
(org-roam-bibtex-mode +1)
...)

Alternatively, if Helm-bibtex is the “entry point” in your Emacs workflow, you could do something like

(use-package helm-bibtex
...
:config
(org-roam-bibtex-mode +1)
...)

Hi @mshevchuk , thanks for the explanation and advice, and for the helpful code snippets!