diff options
Diffstat (limited to '.ai/scripts/lint-org.el')
| -rw-r--r-- | .ai/scripts/lint-org.el | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/.ai/scripts/lint-org.el b/.ai/scripts/lint-org.el index 3e643d4..64b78d0 100644 --- a/.ai/scripts/lint-org.el +++ b/.ai/scripts/lint-org.el @@ -221,11 +221,29 @@ org-lint reports the blank line after the heading-like text." ;; Fixer declined — emit as judgment so nothing is silently swallowed. (lo--emit-judgment name line msg)))) +(defun lo--cj-comment-block-opener-p (line) + "Non-nil when LINE in the current buffer is a `#+begin_src cj: ...' opener. +The cj-comment annotation convention puts `cj:' as the src-block language and +`comment' as the apparent header arg. org-lint reads that shape three ways +(unknown language, empty header-arg value, missing colon in header arg) and +flags each — all three are false positives, since cj-comment is a +Craig-specific annotation marker rather than Babel src-block syntax." + (save-excursion + (lo--goto-line line) + (looking-at-p "^[ \t]*#\\+begin_src[ \t]+cj:"))) + (defun lo--handle-item (item) (let ((name (lo--checker-name item)) (line (lo--line item)) (msg (lo--message item))) (cond + ;; Silent suppression of cj-comment false positives — see + ;; `lo--cj-comment-block-opener-p'. No fix counted, no judgment emitted. + ((and (memq name '(suspicious-language-in-src-block + empty-header-argument + wrong-header-argument)) + (lo--cj-comment-block-opener-p line)) + nil) ((eq name 'item-number) (lo--apply-or-preview name line msg #'lo-fix-item-number)) ((eq name 'missing-language-in-src-block) |
