aboutsummaryrefslogtreecommitdiff
path: root/bard-emacs-modules/bard-emacs-writing.el
diff options
context:
space:
mode:
authorBardofSprites <[email protected]>2026-04-21 17:02:16 -0400
committerBardofSprites <[email protected]>2026-04-21 17:02:16 -0400
commitc22cc2433ba1107ab0d88c77442d87aa9f4f0abb (patch)
tree5328442b9fed1d00cc6cfed6e3b1d3e2141fa12c /bard-emacs-modules/bard-emacs-writing.el
parente2321043adb6b819fe374d13a48933d439cb7226 (diff)
display template for org-roam* functions
Diffstat (limited to 'bard-emacs-modules/bard-emacs-writing.el')
-rw-r--r--bard-emacs-modules/bard-emacs-writing.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/bard-emacs-modules/bard-emacs-writing.el b/bard-emacs-modules/bard-emacs-writing.el
index 37a62a0..ae4a35f 100644
--- a/bard-emacs-modules/bard-emacs-writing.el
+++ b/bard-emacs-modules/bard-emacs-writing.el
@@ -191,6 +191,18 @@
(org-roam-directory (file-truename "~/Notes/denote"))
:bind (("C-c n l" . org-roam-buffer-toggle))
:config
+ (cl-defmethod org-roam-node-type ((node org-roam-node))
+ "Return the TYPE of NODE based on its filetags."
+ (let ((tags (org-roam-node-tags node)))
+ (cond
+ ((member "bib" tags) "reference")
+ ((member "topic" tags) "topic")
+ (tags "main")
+ (t "root"))))
+
+ (setq org-roam-node-display-template
+ (concat "${type:10} ${title:*} " (propertize "${tags:*}" 'face 'org-tag)))
+
(setq org-roam-db-node-include-function
(lambda ()
(not (member "ATTACH" (org-get-tags)))))