Is there a function that will validate internal fuzzy links in
org-mode? I would like to see which links resolve to headers (fontified in blue) and which ones are broke (fontified in red).
John Kitchin had a good solution for external links:
(org-link-set-parameters "file" :face (lambda (path) (if (file-exists-p path) 'org-link 'org-warning)))
and I found this code, as part of
(defun org-lint-invalid-fuzzy-link (ast) (let ((info (list :parse-tree ast))) (org-element-map ast 'link (lambda (link) (and (equal (org-element-property :type link) "fuzzy") (not (ignore-errors (org-export-resolve-fuzzy-link link info))) (list (org-element-property :begin link) (format "Unknown fuzzy location \"%s\"" (let ((path (org-element-property :path link))) (if (string-prefix-p "*" path) (substring path 1) path)))))))))
Is there is a way to marry these together?