This set of org-roam hacks largely map to things that are already in my CCE systems.
- Dynamic and fast agenda which is a bit different but I prefer my version. This includes a function cce/org-roam-files-with-tags which is quite useful as a general org-roam "API".
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 ()
(
(interactive)
(org-roam-capture- :node (org-roam-node-readnil
lambda (node)
("Project")))
(-contains? (org-roam-node-tags node) "p" "project" plain "* NEXT %?"
:templates '(("%<%Y%m%d%H%M%S>-${slug}.org"
:if-new (file+head+olp "#+title: ${title}\n#+category: ${title}\n#+filetags: Project"
"Tasks")))))) (
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."
(interactivelist (completing-read "Tag: " (-map (lambda (row) (car row))
(
(org-roam-db-query [:select tag :from tags
:group-by tag])))))
(org-roam-node-findnil
nil
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
#'org-roam-prefix-map
(bind-keys :map "t" . cce/org-roam-find-by-tag)
("cp" . cce/org-roam-capture-to-project))
(provide 'cce/org-roam-hacks) (