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
.
See also:
NOTE: Many things have changed about org-roam in v2. Code snippets and issues are likely out of date.
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)
org-roam v2
The downside of using ID links in org-roam
V2 is less portable than v1 now that links use `org-id`.
DONE Integrating org-roam [8/8]
DONE Use helm-rg
for fuzzy full text searching notes
Add a keymap entry for it when in org-roam
DONE Use helm-rg
to find notes to make connections to using full text search
- Add an action to insert a file link to the highlighted result
Use
helm-add-action-to-source
to add the action. See github. - Add link anchor words into it (maybe from title?)
(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
- Use
ox-hugo
to export to md and generate html usinghugo
Add#+HUGO_BASE_DIR: ~/Projects/zettel
and#+HUGO_SECTION: ./
to the front matter of each note - Update the capture template to include hugo tags
org-capture
docsorg-roam
capture template docs- Add entry to
org-roam-capture-templates
- Write a fn to batch export org files from a directory (since each note is it’s own file)
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
DONE Ignore any backlinks that are tagged as private
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))))
Links to this note
-
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.
-
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.
-
Org-Roam-Ui Helps You Peer into Your Brain
The org-roam-ui is a visualization and exploration companion to org-roam. The force-directed graph of notes (nodes) and links (edges) shows how concepts fit together and relate. I thought it was primarily eye candy, it’s useful for 1) spotting connections you haven’t already made and 2) identifying orphaned notes that could be linked to other notes.
-
You can run queries directly on the org-roam database directly (it’s just a sqlite database) to get interesting stats about your Zettelkasten.
-
Embark for Emacs seems like a useful way to further customize Emacs actions (
M-x
). I still don’t understand why I would want to use it, so this note is an exploration to try it out and see if it’s useful. -
How to Take Smart Notes (Literature Notes)
A book by Sönke Ahrens about taking notes to improve productivity and writing which is incredibly convincing but extremely impractical in describing what to actually do.
-
The Downside of Using Org-Id Links in Org-Roam
In org-roam v2, a new requirement was added for all notes to have an org ID. This has a few notable downsides.
-
An analog note taking system that emphasizes connections between atomic ideas. First introduced by Niklas Luhmann.
-
Counting Words Written in Org-Roam
A simple way to count the number of words written in org-roam notes is to use the following bash script.
-
List of Tools for Networked Thought
Below is a list of tools for networked thought I’ve come across:
-
Hyperbole is an emacs package that matches text and turns it into links (buttons in
hyperbole
parlance). Links can execute arbitrary code so it’s kind of like a universal emacs subsystem for linking things together (i.e. hypertext). -
Merging Task Management for Work With Org-Roam
I want to combine org-roam setup with my task management setup for work.
-
Steven Wolfram - Seeking the Productive Life - Literary Notes
I read about Steven Wolfram’s personal infrastructure. He develops his approach to just about everything using the tools that he built. I’m guessing this approach works great for building Wolfram as a giant feedback loop but not directly transferable to others.
-
It’s useful to think about the underlying utilities that go into running one’s life and business with the same rigor used to build something significant. Afterall, the things we rely on every day can have an outsized impact on our own performance so why not treat it that way?
-
Using org-mode and org-roam can make a rudimentary CRM system for logging interactions with people, companies, or any other contact.
-
Using Tools for Thought as a Founder
This is a reflection on using org-roam as a founder in the early stages of starting a company. It’s mostly a draft that I may or may not come back to.
-
I don’t use tags as a way of querying topics. Instead, I use a use a small set of tags (
FILETAGS
in org-mode) to drive functionality for task management and notes. -
My hunt for a mobile setup for org-roam continues. LogSeq doesn’t handle org IDs. Plain Org is buggy (syncing with Dropbox, recent file list disappears, copy and paste doesn’t work, etc.). Beorg is too slow after upgrading to iOS 17.
-
An Emacs library that recreates Roam (software that implements a Zettelkasten-like system) using org-mode.
-
Preview Note While Searching Org-Roam
When searching for an org-roam note, the title isn’t always enough to tell if it’s what I was looking for. I want to preview the note without leaving the search interface (using
helm
).