diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-12 02:28:43 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-12 02:28:43 -0500 |
| commit | 1dba35cc182691390d80c789502b174292b14777 (patch) | |
| tree | 1c31b633f2d517d9349c5871a401879e667f96e3 /.ai/scripts/tests | |
| parent | 22e19c21e6aabe0319d4b09a862f4a3705c92509 (diff) | |
| download | rulesets-1dba35cc182691390d80c789502b174292b14777.tar.gz rulesets-1dba35cc182691390d80c789502b174292b14777.zip | |
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.
Diffstat (limited to '.ai/scripts/tests')
| -rw-r--r-- | .ai/scripts/tests/test-lint-org.el | 18 |
1 files changed, 18 insertions, 0 deletions
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 |
