Places in my garden by type

*
planted: 18/04/2026last tended: 18/04/2026
(require 'seq)
(require 'org-roam)

(defun commonplace/org-roam-nodes-with-tag (tag)
  "Return Org-roam nodes that have TAG."
  (seq-filter
   (lambda (n)
     (member tag (org-roam-node-tags n)))
   (org-roam-node-list)))

(defun commonplace/org-roam-tag-count (tag)
  "Return number of Org-roam nodes with TAG."
  (length (commonplace/org-roam-nodes-with-tag tag)))

(defun commonplace/org-roam-nodes-with-tag-sorted-by-mtime (tag)
  "Return Org-roam nodes with TAG, newest file mtime first."
  (seq-sort
   (lambda (a b)
     (time-less-p
      (org-roam-node-file-mtime b)
      (org-roam-node-file-mtime a)))
   (commonplace/org-roam-nodes-with-tag tag)))

(defun commonplace/org-roam-tag-list (tag &optional limit)
  "Return an Org list of nodes with TAG, newest first.
If LIMIT is non-nil, return only the first LIMIT nodes."
  (let* ((nodes (commonplace/org-roam-nodes-with-tag-sorted-by-mtime tag))
         (nodes (if limit (seq-take nodes limit) nodes)))
    (mapconcat
     (lambda (n)
       (format "- [[id:%s][%s]]"
               (org-roam-node-id n)
               (org-roam-node-title n)))
     nodes
     "
")))

1. Main notes

2. Reference notes

3. Elsewhere

3.1. In my garden

Notes that link to this note (AKA backlinks).

3.3. Mentions

Recent changes. Source. Peer Production License.