{
  "$type": "site.standard.document",
  "content": "---\ntitle: \"Configuring Spacemacs org-roam & org-noter for academic writing bliss\"\ndescription: \"How to get org-roam, org-roam-bibtex and org-noter working together in\n  Spacemacs for a Zettelkasten-style academic workflow.\"\ntags:\n  - research\n  - dev\n---\n\nI've always had a decent memory, and so I've never really had a formal system\nfor keeping track of who said what and in which paper. When it comes time to\nwrite something of my own I end up mostly just going from memory and\nre-[google-scholaring](https://scholar.google.com) things from scratch (often\nfinding later that I already had that paper in my\n[Zotero](https://www.zotero.org) database already). As I get older my memory\nisn't as sharp, so I think it's time to use a more systematic workflow for\nwriting---keeping notes about stuff I've read & linking the ideas together.\n\nAll the cool kids are raving about the [Zettelkasten](https://zettelkasten.de)\nmethod, and the [org-roam](https://www.orgroam.com) package supporting this\nworkflow in [Emacs](/blog/tag/dev/). There are also extensions for managing\none's paper library\n([org-roam-bibtex](https://github.com/org-roam/org-roam-bibtex)) and\nreading/annotating pdf files\n([org-noter](https://github.com/weirdNox/org-noter)). When combined, this all\nseems like having academic writing superpowers compared to my \"sit around and\nhope I remember the reference\" approach. See e.g.\n[Noorah Alhasan's EmacsConf 2020 talk](https://emacsconf.org/2020/talks/17/) for\nmore detailed info on this workflow.\n\n:::tip\n\nThis post isn't about how I've become amazingly productive; it's about how I\nwasted a day yak-shaving just to get the software working 🙃\n\n:::\n\n## Getting it all to play nicely in Spacemacs\n\n[Spacemacs](https://www.spacemacs.org) (currently) has good\n[org-mode](https://orgmode.org) support, but only rudimentary org-roam support,\nand doesn't include the org-roam-bibtex and org-noter extensions. So I spent\nsome time yesterday setting it all up. There were a couple of\n[blog](https://philipperambert.com/Installing-Org-Roam-Bibtex-In-Spacemacs)\n[posts](https://www.ianjones.us/org-roam-bibtex) which were helpful, as well as\nthe GitHub READMEs of the various packages---and you should check them out, this\npost isn't meant to be a standalone \"here's everything you need\" guide. But all\nthe info I could find only covered _some_ of the parts I wanted (e.g. using\norg-roam-bibtex but not org-noter, or using all the parts I wanted but for\n[Doom](https://github.com/hlissner/doom-emacs) rather than Spacemacs). So if\nyou're trying to do the same thing as me this post will (hopefully) save you\nsome time.\n\nI'm still tinkering with things, so if you want to see the latest version of my\nconfig then have a look at my public dotfiles repo (especially\n[`.spacemacs`](https://github.com/benswift/.dotfiles/blob/master/spacemacs) and\n[`ben-utils.el`](https://github.com/benswift/.dotfiles/blob/master/ben-utils.el)).\n\nFirst, make sure you've got the `org` and `bibtex` layers installed, and you'll\nneed these extra packages in `dotspacemacs-additional-packages`:\n\n- `org-roam-bibtex`\n- `org-noter`\n- `org-noter-pdftools`\n\nYou'll also need to provide some extra layer `:variables` to the associated\nlayers in `dotspacemacs-configuration-layers` (you could probably do this in\nconfig hooks or even in `spacemacs/user-config` as well---this is just how I did\nit).\n\n```scheme\n(bibtex\n :variables\n bibtex-completion-bibliography (expand-file-name \"~/Documents/org/zotero.bib\")\n bibtex-completion-pdf-field \"file\"\n ;; org-ref stuff (but used by bibtex layer)\n org-ref-default-bibliography (list bibtex-completion-bibliography)\n org-ref-get-pdf-filename-function 'org-ref-get-pdf-filename-helm-bibtex)\n\n(org\n :variables\n org-directory (expand-file-name \"~/Documents/org\")\n org-default-notes-file (concat org-directory \"/inbox.org\")\n ;; org-roam\n org-enable-roam-support t\n org-roam-directory (concat org-directory \"/roam\")\n org-roam-db-location (concat org-roam-directory \"/db/org-roam.db\"))\n```\n\n:::info[Note]\n\nThose first two config variables (the `bibtex-completion-*` ones) weren't listed\nin the blog posts I found, but seemed to be necessary to get\n[helm-bibtex](https://github.com/tmalsburg/helm-bibtex) to find my master\nreference file.\n\n:::\n\nFinally, since org-roam-bibtex, org-noter and org-noter-pdftools aren't\nSpacemacs layers (they're just additional packages) you need to provide some\nextra configuration in `spacemacs/user-config` to hook it all together. For\nconvenience I put it in a separate `.el` file which I load from\n`spacemacs/user-config`.\n\n```scheme\n(use-package org-roam-bibtex\n  :after org-roam\n  :hook (org-roam-mode . org-roam-bibtex-mode)\n  :custom\n  (orb-preformat-keywords '(\"citekey\" \"title\" \"url\" \"author-or-editor\" \"keywords\" \"file\"))\n  (orb-process-file-keyword t)\n  (orb-file-field-extensions '(\"pdf\" \"epub\" \"html\"))\n\n  (orb-templates\n   '((\"r\" \"ref\" plain (function org-roam-capture--get-point)\n      \"\"\n      :file-name \"${citekey}\"\n      :head \"#+TITLE: ${citekey}: ${title}\n#+ROAM_KEY: ${ref}\n\n- tags ::\n- keywords :: ${keywords}\n\n* ${title}\n  :PROPERTIES:\n  :Custom_ID: ${citekey}\n  :URL: ${url}\n  :AUTHOR: ${author-or-editor}\n  :NOTER_DOCUMENT: ${file}\n  :NOTER_PAGE:\n  :END:\"))))\n\n(use-package org-pdftools\n  :hook (org-load . org-pdftools-setup-link))\n\n(use-package org-noter\n  :after (:any org pdf-view)\n  :custom (org-noter-always-create-frame nil))\n\n(use-package org-noter-pdftools\n  :after org-noter\n  :config\n  (with-eval-after-load 'pdf-annot\n    (add-hook 'pdf-annot-activate-handler-functions #'org-noter-pdftools-jump-to-note)))\n```\n\nOnce I've used this system a bit longer and ironed out any kinks I might submit\na dedicated org-roam-bibtex layer to Spacemacs (or add it to the org layer). But\nfor now I'll just leave it here in case any other Spacemacs users are wondering\nhow I did it.\n",
  "createdAt": "2026-05-13T23:14:52.796Z",
  "description": "How to get org-roam, org-roam-bibtex and org-noter working together in Spacemacs for a Zettelkasten-style academic workflow.",
  "path": "/blog/2020/12/16/configuring-spacemacs-org-roam-org-noter-for-academic-writing-bliss",
  "publishedAt": "2020-12-16T00:00:00.000Z",
  "site": "at://did:plc:tevykrhi4kibtsipzci76d76/site.standard.publication/self",
  "tags": [
    "research",
    "dev"
  ],
  "textContent": "How to get org-roam, org-roam-bibtex and org-noter working together in Spacemacs for a Zettelkasten-style academic workflow.",
  "title": "Configuring Spacemacs org-roam & org-noter for academic writing bliss"
}