From 1dba35cc182691390d80c789502b174292b14777 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Fri, 12 Jun 2026 02:28:43 -0500 Subject: fix(scripts): lint-org pre-registers runtime org link types mu4e registers its link type in a live Emacs, so batch org-lint parsed [[mu4e:msgid:...]] links as fuzzy heading refs and flagged "Unknown fuzzy location" on links that work interactively. lint-org now registers each type in lo-runtime-link-types as a no-op before linting. org-link-set-parameters merges rather than replaces, so a genuinely loaded mu4e keeps its real parameters. --- .ai/scripts/tests/test-lint-org.el | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to '.ai/scripts/tests') diff --git a/.ai/scripts/tests/test-lint-org.el b/.ai/scripts/tests/test-lint-org.el index d4b3ba0..3a83602 100644 --- a/.ai/scripts/tests/test-lint-org.el +++ b/.ai/scripts/tests/test-lint-org.el @@ -342,6 +342,24 @@ content (should (member 'suspicious-language-in-src-block (lo-test--checkers judgments))))) +;; mu4e:msgid: links are registered by mu4e at runtime in a live Emacs; in +;; batch, org-lint parses them as fuzzy heading refs and reports "Unknown +;; fuzzy location" — a false positive (home's todo.org, 2026-06-11). +;; lint-org pre-registers known runtime link types so they parse as links. +(defconst lo-test--runtime-link "\ +* Heading + +See [[mu4e:msgid:abc123@mail.example.com][the thread with Jonathan]]. +") + +(ert-deftest lo-runtime-link-type-is-not-flagged () + (let* ((out (lo-test--run lo-test--runtime-link)) + (res (plist-get out :result)) + (judgments (lo-test--judgments (plist-get out :issues)))) + (should (equal lo-test--runtime-link res)) + (should (= 0 (plist-get out :fixes))) + (should-not (member 'invalid-fuzzy-link (lo-test--checkers judgments))))) + ;;; --------------------------------------------------------------------------- ;;; cj-comment block — Craig's annotation convention is silently suppressed -- cgit v1.2.3