Instantly share code, notes, and snippets.
Code from Org-roam tags blogpost.
I find I need to add expand-file-name to tell the buffer is a note or not.
(defun +org-notes-buffer-p ():
(defun +org-notes-buffer-p ()
(string-equal (expand-file-name (file-name-as-directory org-roam-directory))
Yes, good point! Depending on the value of org-roam-directory you might need to expand it.
Thanks for your code. It really helps to tag the ZK notes.
Do you consider to merge into org-roam? I think this is a useful function.
Thanks for the kind words. Actually, I didn't think about contributing this to org-roam 🤔 Maybe I should to think about it haha.
By the way, I have more utilities for working with tags and filetags. You can read about them here.