The Complete Computing Environment

5 Org Roam Hacks for Better Productivity in Emacs - System Crafters



This set of org-roam hacks largely map to things that are already in my CCE systems.

Capturing tasks directly in to projects

This is a stroke of genious:

(org-roam-capture- :node (org-roam-node-read nil (my/org-roam-filter-by-tag "Project"))

(defun cce/org-roam-capture-to-project ()
  (org-roam-capture- :node (org-roam-node-read
                            (lambda (node)
                              (-contains? (org-roam-node-tags node) "Project")))
                     :templates '(("p" "project" plain "* NEXT %?"
                                   :if-new (file+head+olp "%<%Y%m%d%H%M%S>-${slug}.org"
                                                          "#+title: ${title}\n#+category: ${title}\n#+filetags: Project"

NEXT automatically copy or move completed tasks to dailies

this is interesting…………

Finding nodes which are attached to a tag

This is analogous to Navigating notes by relations but for Tags.

(defun cce/org-roam-find-by-tag (tag)
  "select a node from a list filtered by TAG, creating it if necessary."
   (list (completing-read "Tag: " (-map (lambda (row) (car row))
                                   (org-roam-db-query [:select tag :from tags
                                                       :group-by tag])))))
   (lambda (node)
     (-contains? (org-roam-node-tags node) tag))))

NEXT provide a template to the finder which sets the FILETAGS

Make it an Arroyo Emacs module

(bind-keys :map #'org-roam-prefix-map
           ("t" . cce/org-roam-find-by-tag)
           ("cp" . cce/org-roam-capture-to-project))
(provide 'cce/org-roam-hacks)