aboutsummaryrefslogtreecommitdiff
path: root/.ai/scripts/lint-org.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-11 14:58:59 -0500
committerCraig Jennings <c@cjennings.net>2026-06-11 14:58:59 -0500
commit6f575e64b1e9f5d9332db73b1e6427d500f90f48 (patch)
treee6790058845456c730fcb0a48f3e6d3368beb22b /.ai/scripts/lint-org.el
parent8d790f371e54a8cc3e79a5ce72cd4dd5b3fa4513 (diff)
downloadrulesets-6f575e64b1e9f5d9332db73b1e6427d500f90f48.tar.gz
rulesets-6f575e64b1e9f5d9332db73b1e6427d500f90f48.zip
fix(scripts): lint-org resolves wrap-org-table from its own directory
Consumers load lint-org with a bare -l and no load-path flag, so the new require of wrap-org-table failed everywhere outside make test's -L. lint-org now adds its own directory to load-path first. lint-org-cli.bats locks the bare-load contract for both scripts.
Diffstat (limited to '.ai/scripts/lint-org.el')
-rw-r--r--.ai/scripts/lint-org.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/.ai/scripts/lint-org.el b/.ai/scripts/lint-org.el
index 5d47644..05365fe 100644
--- a/.ai/scripts/lint-org.el
+++ b/.ai/scripts/lint-org.el
@@ -42,6 +42,14 @@
(require 'org-lint)
(require 'cl-lib)
(require 'subr-x)
+
+;; wrap-org-table.el lives beside this file. Consumers load lint-org with a
+;; bare `-l path/lint-org.el` (wrap-it-up, /lint-org) — no -L on the load
+;; path — so resolve the sibling from this file's own directory.
+(eval-and-compile
+ (add-to-list 'load-path
+ (file-name-directory (or load-file-name buffer-file-name
+ default-directory))))
(require 'wrap-org-table) ; render-width + table parsing for the table check
(defvar lo-fixes 0