Hi! This is my first post so please be gentle. I am on doom emacs, and an ivy-bibtex user since about a year back and installed org-roam-bibtex yesterday. I have managed so far to set up a system within org-roam-bibtex so that my slip-notes goes into one folder and my literature notes goes into a subfolder of that folder. I have also managed to make my slip notes have title
, roam alias
, and time stamps for created
and last modified
. As for the literature notes I have made them have a title
that starts with their citekey, and include a roam key
and time stamps for created
and last modified
. So far so good. However, I have so far not manage to integrate the org-ref part into my system, meaning I cannot use org-noter for reading and citing an article that I am reading. I have tried to enter some org-ref code into my init file following the instructions on org-ref’s github page but I do not get it to work. I would therefore really need som guidance on how to integrate the org-ref and org-noter code into my current init file code. Please remember that I am on doom emacs. Below is the code relevant for the set up in config.el
:
;;------------------------------------------------------------------------------------
;; org
;;------------------------------------------------------------------------------------
;; If you use `org' and don't want your org files in the default location below,
;; change `org-directory'. It must be set before org loads!
(setq org-directory "~/org/")
;;------------------------------------------------------------------------------------
;; pdf-tools
;;------------------------------------------------------------------------------------
(use-package! pdf-tools
:load-path "site-lisp/pdf-tools/lisp"
:magic ("%PDF" . pdf-view-mode)
:config
(pdf-tools-install :no-query)
(setq-default pdf-view-display-size 'fit-page)
(setq pdf-annot-activate-created-annotations t)
(setq pdf-view-resize-factor 1.1)
(setq pdf-view-use-unicode-ligther nil)
)
;;---------------------------------------------------------------------------------------
;; ivy-bibtex
;;---------------------------------------------------------------------------------------
(autoload 'ivy-bibtex "ivy-bibtex" "" t)
;; ivy-bibtex requires ivy's `ivy--regex-ignore-order` regex builder, which
;; ignores the order of regexp tokens when searching for matching candidates.
;; Add something like this to your init file:
(setq ivy-re-builders-alist
'((ivy-bibtex . ivy--regex-ignore-order)
(t . ivy--regex-plus)))
(setq bibtex-completion-bibliography "/Users/joafr/Documents/bibfiles/library.bib"
bibtex-completion-library-path "/Users/joafr/Documents/bibpdfs"
bibtex-completion-notes-path "/Users/joafr/Documents/bibnotes"
bibtex-completion-notes-extension ".org"
bibtex-completion-find-additional-pdfs t
bibtex-completion-notes-template-multiple-files "Notes on ${author-or-editor} (${year}) - ${title}"
bibtex-completion-notes-template-one-file "# Notes on ${author-or-editor} (${year}): ${title}")
(delete-file "~/Library/Colors/Emacs.clr")
;;------------------------------------------------------------------------------------
;; org-roam
;;------------------------------------------------------------------------------------
(setq org-roam-directory "/Users/joafr/org/zettelkasten")
(use-package! org-roam-bibtex
:after org-roam
:hook (org-roam-mode . org-roam-bibtex-mode)
:bind (:map org-mode-map
(("C-c n a" . orb-note-actions)))
:config
(require 'org-ref)) ; optional: if Org Ref is not loaded anywhere else, load it here
;;;; Add the cite-key in the title of the notes and make sure they end up in bibnotes folder.
(setq orb-templates
'(("r" "ref" plain (function org-roam-capture--get-point) "%?"
:file-name "bibnotes/${citekey}"
:head "#+TITLE: ${citekey}: ${title}\n#+ROAM_KEY: ${ref}\n#+CREATED: %U\n#+LAST_MODIFIED: %U\n"
:unnarrowed t)))
(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#+ROAM_ALIAS: \n#+CREATED: %U\n#+LAST_MODIFIED: %U\n"
:unnarrowed t)))
In my ìnit.el`, I have simply written:
An in my packages.el
file I have included the following code:
(package! pdf-tools)
(package! ivy-bibtex)
(package! pandoc)
(package! polymode)
(package! poly-R)
(package! poly-markdown)
(package! doom-themes)
(package! org-noter)
(package! org-roam-bibtex
:recipe (:host github :repo "org-roam/org-roam-bibtex"))
;; When using org-roam via the `+roam` flag
(unpin! org-roam)
;; When using bibtex-completion via the `biblio` module
(unpin! bibtex-completion helm-bibtex ivy-bibtex)
Grateful for any help I can get.