Org-Roam

An Emacs library that recreates Roam (software that implements a Zettelkasten-like system) using org-mode.

All notes are stored as individual files addressed by {timestamp}-{underscore_separated_title} and can be backlinked to create a graph of notes which can be generated using graphviz.

Read the docs

See also:

Problems with org-roam

  • Auto completion is finicky (case sensitive, not fuzzy matching)
  • Can’t search for content in the body of notes when adding backlinks
  • Synchronizing between mobile and desktop is difficult e.g. Beorg on iOS can’t support a template that doesn’t have a title (org-roam’s template just has a #+TITLE tag)
  • You can’t export to HTML in a built in way (looks like you need to use ox-hugo with a config header in each note which is ugly)
  • Buffers don’t wrap text by default
  • Distinguishes between backlinks and ‘cite backlinks’ which is confusing
  • Automatically changes the file name if you change the title (these should be decoupled if you plan to publish notes)

DONE Integrating org-roam [88]

DONE Use helm-rg for fuzzy full text searching notes

Add a keymap entry for it when in org-roam

(use-package helm-rg
  :ensure t
  :config
  ;; Add actions for inserting org file link from selected match
  (defun insert-org-mode-link-from-helm-result (candidate)
    (interactive)
    (with-helm-current-buffer
      (insert (format "[[file:%s][%s]]"
                      (plist-get candidate :file)
                      ;; Extract the title from the file name
                      (subst-char-in-string
                       ?_ ?\s
                       (first
                        (split-string
                         (first
                          (last
                           (split-string (plist-get candidate :file) "\\-")))
                         "\\.")))))))

  (helm-add-action-to-source "Insert org-mode link"
                             'insert-org-mode-link-from-helm-result
                             helm-rg-process-source))

DONE Toggle truncate lines in org-roam buffers

Make org-mode always use wrapped lines (setq org-startup-truncated nil)

DONE Set up exporting to html

https://github.com/alexkehayias/emacs.d/blob/master/init.el#L715

DONE Cloud backup

  • iCloud is nice since all my devices could use it without any additional software, but you can’t symlink directories so an app can’t use the same data directory as another. This makes it difficult to use multiple apps as an input source to zettel notes.
  • Dropbox does sketchy things to desktops and used to cause random CPU spikes that would eat through laptop battery life. Not sure how much that’s changed.
  • Github might work, but once the number of files increases that might become unwieldy.
  • Decided to use icloud for now for syncing a file between Beorg to be processed into notes. On desktop, will use github to backup the exported notes until I can figure out something better for the underlying org mode files.

DONE Ignore any notes from hugo export that are tagged as private

https://github.com/alexkehayias/emacs.d/blob/master/init.el#L715

https://github.com/alexkehayias/emacs.d/blob/master/init.el#L715

DONE Update org-roam journal template to include private

(setq org-roam-dailies-capture-templates
      (quote (("d" "Default" plain (function org-roam--capture-get-point)
               "%?"
               :file-name "%(format-time-string \"%Y-%m-%d--%H-%M-%SZ--journal\" (current-time) t)"
               :head "#+HUGO_BASE_DIR: ~/Projects/zettel\n#+HUGO_SECTION: ./\n#+TITLE: %<%Y-%m-%d>\n#+ROAM_ALIAS:\n#+ROAM_TAGS: private\n"
               :unnarrowed t))))

An analog note taking system that emphasizes connections between atomic ideas. First introduced by Niklas Luhmann.

Below is a list of tools for networked thought I’ve come across:

Knowledge work processes should be accretive (rather than ephemeral or ad-hoc). For note-taking, adding new notes should make other notes more useful and the accumulated knowledge should lead to new connections and thereby new ideas.

How we think about thoughts is composed of metacognitive knowledge - our understanding of our thinking and learning, metacognitive regulation - strategies and practices that control our learning, and metacognitive experiences - thoughts and feelings while learning something.

You can run queries directly on the org-roam database (it’s just a sqlite database) to get interesting stats about your Zettelkasten. The location of the database can be found by evaluating org-roam-db-location.