Productivity System Second Brain
Org Roam - Build a Second Brain in Emacs
Section titled “Org Roam - Build a Second Brain in Emacs”Sources:
Section titled “Sources:”- Video: System Crafters - Getting Started with Org Roam - Build a Second Brain in Emacs
- Source files: Getting Started with Org Roam
Introduction
Section titled “Introduction”Questions:
- How many org files do I need?
- What to put in org files?
Roam approach is creating topic focused org files rather than hierarchical files. Like a personal wiki. Roam’s strategy is taken from Zettlekasten method.
- Single topic notes linked together to create a networked knowledge base
- Base reminds you of connections between topics
Why database?
- Org roam keeps track of all nodes and keeps track of links
- Allows to build on top of database
Prerequisites
Section titled “Prerequisites”- Org Roam v2 depends on customized SQLite database
- Needs compiler to build or instructions for Windows
Install
Section titled “Install”(use-package org-roam :ensure t)
- When run, will compile.
- Use a separate directory for org roam files as org roam files have special metadata
- If you have upgraded to v2, set to acknowledge the warning
New Node
Section titled “New Node”- Find, Create new node:
C-c n f
- Starts with a capture buffer before being created
- They are org file with additional properties. Org Roam will re-build database based on files. Database will system itself to files and can work across machines.
- New nodes can be created within a node with creating an org ID in a heading
- Create aliases for node names:
org-roam-alias-add
- Create a new node insert:
org-roam-node-insert
orC-c n i
- Inserts link to existing node. Link is based on org ID and not file paths
- Create new links to nodes and nodes will be automatically created
Viewing Backlinks
Section titled “Viewing Backlinks”-Shows backlinks to current node and context of resources:
org-roam-buffer-toggle
Benefits
Section titled “Benefits”- Build personal knowledge base
- Write smaller notes and have relationships, think less of about hierarchy
Capturing Notes Efficiently in Emacs with Org Roam
Section titled “Capturing Notes Efficiently in Emacs with Org Roam”Reference
Section titled “Reference”Overview
Section titled “Overview”- Custom templates to insert into org roam files
- Good capture workflow
Capture Templates
Section titled “Capture Templates”Common information you want to capture:
- Summary of content
- Bibliography
- Quotations
- Links to relevant notes and resources to expand on ideas learned
Org Roam has its own capture templates for new notes. It is a separate capture system from org capture. During node creation, org roam can prompt you to select your own custom capture templates.
-
Default Org-Roam Capture Template
To build custom templates, we will set the
org-roam-capture-templates
variable which will overwrite the default, so the default one needs to be copied over. The default is:'(("d" "default" plain"%?":if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n"):unnarrowed t))- “d” is the key to trigger the template
- “default” is the name of the template
- “plain” is the type of text to insert, others with subheadings in notes are available, plain is most common
- ”%?” is the actual text being inserted, from org mode
- ”:if-new …” is the file name and the header - recommend not changing to allow unique note names, title of document is set based on title you give
- ”:unnarrowed t” org setting so full file is visible on creation
Opportunities to Configure:
- File name
- Text to insert in note
- Prompt yourself to fill in information
-
Topic Specific Template
Example, new template on programming languages
("l" "programming language" plain"* Characteristics\n\n- Family: %?\n- Inspired by: \n\n* Reference:\n\n":if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n"):unnarrowed t)- ”* Characteristics” is the first heading
- ”- Family: …” bullet points to insert initially
- ”%?” where cursor will start
- “if-new…” unchanged from default template
Try it out with
org-roam-node-insert
and it will ask you for the template to use. Fill out note, thenC-c C-c
to save. -
Creating a literature reference template
Notes for books, articles, etc.
("b" "book notes" plain"\n* Source\n\nAuthor: %^{Author}\nTitle: ${title}\nYear: %^{Year}\n\n* Summary\n\n%?":if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n"):unnarrowed t)- “%Author” is a prompt to fill in author
- “%Year” is a prompt to fill in year
- ”${title} insert title of new note as literature name
- ”* Summary” first heading of note
-
Project template
("p" "project" plain "* Goals\n\n%?\n\n* Tasks\n\n** TODO Add initial tasks\n\n* Dates\n\n":if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n#+filetags: Project"):unnarrowed t)- Entries for name, status, dates, tasks (with org TODO), references
- Notice in
if-new
has afiletags:
section and file is tagged as project- Later you can use org-roam database to query project files like to use with org-agenda
- Using selectrum/vertico with marginalia, can see tags in file list
-
Store Templates in Org Files
Instead of editing in elisp, can store the templates in org files
- Create a new node after the name of your template, like “Note-Template-Book.org”
* SourceAuthor: %^{Author}Title: ${title}Year: %^{Year}* Summary%?- In actual template, remove the , in front of the *
- Save the file and replace the init.el entry like following:
(org-roam-capture-templates'(("d" "default" plain"%?":if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n"):unnarrowed t))("b" "book notes" plain (file "~/RoamNotes/Templates/Note-Template-Book.org"):if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n"):unnarrowed t)) -
Customizing the Default Template
("d" "default" plain "%?":if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n#+date: %U\n"):unnarrowed t)- “+date: %u” adds a date to meta of note
- You can customize the file name, like remove the timestamp, though beware of filename collisions
See further examples of possible inserts in Org Mode Manual: Template Expansion
If you change the template, keep in mind you’ll need to update older files using the template to match your new format.
Org Roam: The Best Way to Keep a Journal in Emacs
Section titled “Org Roam: The Best Way to Keep a Journal in Emacs”Sources:
Section titled “Sources:”See also rest of series https://www.youtube.com/@SystemCrafters/search?query=org%20roam
How to Build the Ultimate Productivity System (2022)
Section titled “How to Build the Ultimate Productivity System (2022)”2../022-10-01 source Ali Abdaal
Layer 1
Section titled “Layer 1”- Calendar
- Task Manager
- File management
Layer 2
Section titled “Layer 2”- Reading / Library
- Plus contextual notes
- To read list
- Notes
Layer 3
Section titled “Layer 3”- “Second brain”