Denote vs Org-roam
2022-11-27 #emacs #org-mode
- 2022-12-08: Check out the followup post Using Denote with Subdirectories to improve the out-of-the-box experience of Denote.
Denote is getting popular in the Emacs community recently. I decided to give it a shot, learn how it works and see if I should migrate from Org-roam to it. I am writing this blog post to compares Denote with Org-roam.
In essence, Denote is a note-taking package for Emacs based on its file-naming scheme, which works for all kinds of files. Org-roam is a note-taking package for Org-mode, utilizing a database indexing org files.
Identifier and Linking
Denote uses the timestamp in its file-naming scheme as the identifier and uses its link type
denote: for linking. This approach allows notes to be taken in other formats (
Org-roam uses the
ID properties as the identifier and the built-in link type
id: for linking. It sticks with the Org-mode ecosystem. It utilizes an external database to indexes note metadata, like titles, tags, and locations and searching notes efficiently without parsing any org files. When working on multiple computers, the user might need to re-index the org files.
This is the biggest architectural difference between Denote and Org-roam. If all notes are written in Org-mode, I find Org-roam provides cleaner org files because it does not introduce a new link type.
Denote works for all files. Not only can the user take notes in Org-mode, Markdown, or Txt, but also name a PDF file so that it could be identified, linked, searched and tagged.
Org-roam works for only Org-mode files. It leverages the mature Org-mode ecosystem. For example, the user can use
org-attach to associate a PDF file with a note.
Frankly speaking, Denote is designed for Emacs users. Org-roam is designed for Org-mode users.
In a file-based note system, it is inevitable to have coupling between the filename and the content (e.g., keeping
#+TITLE: and file name in Org-mode).
Denote answers with its file-naming scheme and need to keep filename consistent and update-to-date so that search results remain valid after changing title or tags. Maintaining the naming scheme could become a burden without any automation. Denote provides
denote-dired-rename-* for the job.
Org-roam does not enforce any file-naming scheme. The default
org-roam-capture-templates uses the creation timestamp and title slug as the filename, and that is all.
Note that the Denote file-naming scheme has a limitation: cannot define a tag with multiple words. For example, the tag “note-taking” becomes two tags “note” and “taking” unless combining them to “notetaking”.
Utilizing its file-naming scheme, Denote can efficiently search for a note by filename without parsing the content of the file. Users can search notes with titles and tags by prefix
_ respectively. The out-of-the-box experience does not fit my need. Users need to write some emacs lisp or learn Dired to search efficiently.
Org-roam provides better out-of-the-box searching experience. With a little customization, I can search notes by folder name, title, and tags, recursively across sub-folders, sorted by the last modification time. This suits most of my needs.
It is nice to eradicate the dependency on a database with Denote. However, I found it hard to replicate the Org-roam searching experience with Denote, especially sorting notes by last modification time within subdirectories. Note that full-text search could be achieved by
counsel-rg for both.
Denote Comparison to Org-roam
- No database is needed. Seamless across multiple machines.
- A simple but powerful file-naming scheme that works for all files.
- Allow notes in other formats (txt, md). (Not for me. All my notes are in org.)
- Uses non-standard link type
- Worse out-of-the-box searching experience. (I believe it is hackable)
- Tag with multiple words like “note-taking” becomes “note” and “taking”
It is tempting to eradicate the dependency on a database with a simple file-naming scheme. However, I am hesitant to introduce
denote: to my org files and want to develop a searching experience that on is par with Org-roam first.
I decided to stick with Org-roam but keep exploring Denote in the next couple of weeks. Stay tune :-)