org-roam

Tags:  CCE

org-roam repository on GitHub. Org Roam is Roam Research in org-mode maybe. a Knowledge Management Tool for Emacs org-mode in nonlinear Zettelkasten fashion. It is for now the root of my personal Knowledge Base, the repository which feeds my Arcology, where I develop thoughts and make plans, and where the CCE is developed. It is configured quite simply, with a keymap exposed to me on <SPC>r via Evil Leader. One of these days I'll build a cleaner abstraction defining these maps.

- name: makeinfo is installed
  shell:
    creates: /data/data/com.termux/files/usr/bin/texinfo
    cmd: "pkg install -y {{item}}"
  with_items:
  - texinfo
  - sqlite
  when: ansible_pkg_mgr == "unknown"

- name: org-roam up to date
  become: no
  git:
    repo: https://code.rix.si/upstreams/org-roam
    dest: ~/Code/org-roam
    version: master
  register: gitup
  when: ansible_pkg_mgr != "dnf"

- name: byte compiled
  become: no
  shell:
    creates: ~/Code/org-roam/org-roam.elc
    chdir: ~/Code/org-roam
    cmd: make compile
  when: gitup.changed and ansible_pkg_mgr != "dnf"

Rather than install org-roam with the system wide load-path, on systems with home-manager it's included through package overrides:

org-roam = epkgs.melpaPackages.org-roam.overrideAttrs(old: {
  src = /home/rrix/Code/org-roam;
});

I need sqlite3 installed in my home-manager:

lib.mypkgs.org-roam = [
  pkgs.sqlite
];

Install the build dependencies of org-roam and add it to load-path.

(use-package emacsql-sqlite3)
(use-package buttercup)
; (add-to-list 'load-path (expand-file-name "~/Code/org-roam"))
(use-package org-roam
  :hook (after-init . org-roam-mode)
  :config
  (setq org-roam-directory (expand-file-name "~/org/"))
  (setq org-roam-link-title-format "%s")
  (setq org-roam-completion-system 'default)
  (setq org-roam-prefer-id-links nil)
  (setq org-roam-update-db-idle-seconds 15)
  (if (boundp 'org-roam-cached-keywords)
      (dolist (ent '("BIRTHDAY" "RSS_CATEGORY" "RSS_URL"))
        (add-to-list 'org-roam-cached-keywords ent))
    (progn
      (setq org-roam-cached-keywords '("BIRTHDAY" "RSS_CATEGORY" "RSS_URL"))
      (require 'org-roam-keywords)))
  :bind (:map evil-leader--default-map :prefix "r" :prefix-map org-roam-prefix-map
              ("r" . org-roam-random-note)
              ("l" . org-roam)
              ("k" . org-roam-find-ref)
              ("f" . org-roam-find-file)
              ("g" . org-roam-show-graph)
              ("i" . org-roam-insert))
  :bind (:map evil-insert-state-map
              ("C-c r" . org-roam-insert)))

I have a lot of work still to expand upon this, I reference a lot of this under a Projects headline [Knowledge Management]

(setq org-roam-capture-templates '())

(add-to-list 'org-roam-capture-templates
             '("d" "default" plain #'org-roam--capture-get-point
               "%?"
               :file-name "${slug}"
               :head "#+TITLE: ${title}\n"
               :unnarrowed t))

List of Things to Fund

(provide 'cce/org-roam)

This is Referenced

''

in "How to Take Smart Notes With org-mode"

Summary of How to Take Smart Notes showing how org-roam applies to it.

in "Concept Operating System"

Literally, it's an operating system for producing independent knowledge work, a collection of tools implementing a Second Brain-type thinking tool using the org-roam nonlinear notebook system and a set of personal practices encoded within it, sitting atop a mesh of interlinked Concepts and Topic Files.

in "org-mode meta application"

org-roam and the CCE are also org-mode meta-applications. My Practice Captures may be, I am unsure.

in "Arcology Sitemap"

That said, I've always had a visual streak, I like being able to see the forest for the trees, as it were. Being able to see the full set of relationships is a useful thing; org-roam provides a server process which can provide a relationship graph for a page or my entire Knowledge Base, but I would like to have something similar directly in the Arcology. That is what this page describes, a sitemap which rather than listing the pages in a heirarchy lists them in a connected graph.

in "CCE Dynamic Loader"

The new CCE must be able to grow past this, and I believe it can. I have implemented a minimal patch to org-roam in org-roam: #+KEYWORD caching in org-roam-db so that I can query the org-roam cache for arbitrary keywords of my own devise. And so we can build a configuration search engine. This relies on a fork of org-roam, right now, which is unfortunate and I account for that in the org-roam documentation.

in "CCE Dynamic Loader"

The new CCE must be able to grow past this, and I believe it can. I have implemented a minimal patch to org-roam in org-roam: #+KEYWORD caching in org-roam-db so that I can query the org-roam cache for arbitrary keywords of my own devise. And so we can build a configuration search engine. This relies on a fork of org-roam, right now, which is unfortunate and I account for that in the org-roam documentation.

in "Extracting Org Roam Headings"

Call this function cce/org-roam-extract within an org-mode heading to extract that text to a new org-roam buffer. It uses the title as a default and inserts a link to the buffer on completion using the org-roam capture systems

in "org-protocol to quickly annotate web pages"

Wiring it all together, the org-roam reference capture:

in "org-protocol to quickly annotate web pages"

org-roam reference capture

in "org-protocol to quickly annotate web pages"

org-roam provides native functionality for this in the org-roam-protocol library. I create a second capture template that just uses plain old org-protocol on its own to quickly capture YouTube videos or other things I wish to watch.

in "org-protocol to quickly annotate web pages"

This page is a CCE module based on two sources12 from the WWW (Probably one of Sacha's Emacs weeklies) and the org-roam documentation.

in "Arcology Roam Models"

When I had a forked arcology-db, this table was normalized, a query for the file would return multiple rows, but org-roam upstream stores all the tags in a single column, (print)'d like link properties. This makes the data far less useful for querying than it used to be and I intend to fix that one way or another, maybe I will add a custom tags table like I did for #+KEYWORD caching in org-roam-db.

in "Knowledge Management"

in "Knowledge Management"

in "Deft"

in "The Arcology Project"

in "The Arcology Project"

in "The Arcology Project"

in "The Arcology Project"

in "The Arcology Project"

in "The Arcology Project"

in "The Arcology Project"

in "org-roam: #+KEYWORD caching in org-roam-db"

in "Arcology DB Creates a Queryable Cache of Knowledge"

in "CCE on Termux"

in "CCE on Termux"

in "CCE on Termux"

in "Dynamic and fast agenda"

in "Dynamic and fast agenda"

in "Dynamic and fast agenda"

in "The Complete Computing Environment"

in "The Complete Computing Environment"

in "Shared CCE Helpers"

in "Shared CCE Helpers"

in "The Arcology Garden"

in "Generate a Dynamic Home Manager Configuration"

in "Universal Aggregator"

in "Universal Aggregator"


  1. https://cestlaz.github.io/post/using-emacs-70-org-protocol/↩︎

  2. https://org-roam.readthedocs.io/en/develop/roam_protocol/↩︎