From 951b6fc63129577a80e1d46f46eeafff005fe636 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Tue, 14 Jul 2026 01:27:17 -0500 Subject: fix(scripts): stop org table helpers rewriting block content Both helpers treated any pipe-led line as a table row, so ASCII art in an example block got mangled into a bordered table (a work file took a 1949-line reformat on 2026-07-09). The scanners now track the open block's type and skip its content. Only the matching end marker closes a block, so a literal end_src quoted inside an example block can't re-expose it. The deeper cause was wrap-org-table's load-time dispatch: it fired when lint-org merely required the library, running the reformatter over files lint-org was only asked to report on. It now dispatches only when named as the entry script. lint-org's CLI is also report-only by default now. Writes require --fix, and the wrap-up workflow and lint command pass it. --- .claude/commands/lint-org.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.claude/commands') diff --git a/.claude/commands/lint-org.md b/.claude/commands/lint-org.md index 64ec967..d9719fa 100644 --- a/.claude/commands/lint-org.md +++ b/.claude/commands/lint-org.md @@ -60,10 +60,10 @@ Out of scope (refuse, don't try to lint): 3. Invoke the script: ```bash - emacs --batch -q -l .ai/scripts/lint-org.el FILE + emacs --batch -q -l .ai/scripts/lint-org.el --fix FILE ``` - The script applies every mechanical fix, then emits structured stdout. First line is a summary; each subsequent line is a plist describing one issue: + `--fix` is required for the writes — the script's default invocation is report-only (a linter reports, it doesn't write). With the flag, the script applies every mechanical fix, then emits structured stdout. First line is a summary; each subsequent line is a plist describing one issue: ``` ;; lint-org: file=todo.org mechanical=4 judgment=11 -- cgit v1.2.3