tags

Table of Contents

daily
Daily notes.
meta
Notes about the note system.
slash
Slash pages.
stub
Stub notes.

1. Is the list correct?

(cl-with-gensyms (exit)
  (catch exit
    (let* ((tags (let ((buf nil))
                  (dolist (node (org-roam-node-list))
                    (setq buf (nconc buf (org-roam-node-tags node))))
                  (sort buf :in-place t)
                  (mapcar #'car (seq-group-by #'identity buf))))
           (listed-tags (org-element-map (org-element-parse-buffer) 'plain-list
                          (lambda (node)
                            (unless (eq 'descriptive (org-element-property :type node))
                              (throw exit "FORMAT ERROR"))
                            (org-element-map node 'item
                              (lambda (node)
                                (car (org-element-property :tag node)))))
                          nil :first-match))
           (missing (cl-set-difference tags listed-tags :test #'string-equal))
           (extra (cl-set-difference listed-tags tags :test #'string-equal))
           (errs nil))
      (when missing
        (setq errs (nconc errs (list (format "MISSING: %s" missing)))))
      (when extra
        (setq errs (nconc errs (list (format "EXTRA: %s" extra)))))
      (if errs (s-join "\n" errs)
        "OK"))))
MISSING: (meta private talk)

Author: Nicholas Coltharp

Created: 2026-03-18 Wed 00:01

Validate