I’ve kept a list of books I’ve read as a plain text (well, technically, Markdown) file for years. I wrote about it here . The public version is rendered using Github Pages at books.baty.net . This is fine, but at some point last year I also started logging books in an Org mode file, just to see how it felt. It felt pretty good!Continue reading…
Org-roam is “A plain-text personal knowledge management system” using Emacs and Org-mode and I put nearly all my notes in there. While it’s easy to find notes in org-roam based on filename, there’s no obvious way to search the contents of notes. Weird, right?
I could use the default
projectile search, but my org-roam files live within my main ~/org directory, so the results are littered with all my other org documents. I’d prefer to only search in
I use a simple lisp function to help with this. It uses
(defun jab/search-roam () "Run consult-ripgrep on the org roam directory" (interactive) (consult-ripgrep org-roam-directory nil))
I added a keybinding for it to my other org-roam bindings:
(map! "C-c n f" 'org-roam-node-find "s-u" 'org-roam-node-find "C-c n i" 'org-roam-node-insert "C-c n t" 'org-roam-dailies-goto-today "C-c n d" 'org-roam-dailies-capture-today "C-c n c" 'org-roam-capture "C-c n s" 'jab/search-roam ;; <-- my new keybinding "C-c n l" 'org-roam-buffer-toggle)
Now, with a quick
C-s n s I can search my org-roam files using the blazingly fast ripgrep .
If there’s a better way to do this, I’m all ears.
I’m trying something new.
I’ve become a pretty heavy user of Org-roam for personal notes. I put nearly everything there now; technical notes, contact information, project notes, vendor info, etc. These notes are all nicely linked and backlinked and live in my main ~/org directory so I can easily find things right within Emacs.
A portion of these notes might be useful to other people. So I’m exporting the shareable notes from Org-roam as Hugo -compatible Markdown files. This turned out to be surprisingly easy. You can see the results at https://notes.baty.net and the details of how it works makes a good example.
I’m sure there are a dozen ways to do this, but this seems to work quite well.