aboutsummaryrefslogtreecommitdiff
path: root/bard-emacs-modules
diff options
context:
space:
mode:
Diffstat (limited to 'bard-emacs-modules')
-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)))))