aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bard-emacs-modules/bard-emacs-writing.el12
-rw-r--r--config.org12
2 files changed, 24 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)))))
diff --git a/config.org b/config.org
index 0fa1a1f..616ef48 100644
--- a/config.org
+++ b/config.org
@@ -2297,6 +2297,18 @@ Watch [[https://protesilaos.com/codelog/2024-02-08-emacs-window-rules-display-bu
(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)))))