summaryrefslogtreecommitdiff
path: root/docs/NOTES.org
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2025-11-04 23:26:42 -0600
committerCraig Jennings <c@cjennings.net>2025-11-04 23:26:42 -0600
commiteda461086e94265b67ab5b21032e7ee23112ad87 (patch)
tree90983461736e8b7f0aa435a7b1fddb4b2825cefa /docs/NOTES.org
parentb520add37ae23f0411e2c6512fe6b8d7418bd525 (diff)
feat: Add LanguageTool integration for comprehensive grammar checking
Integrated LanguageTool as an on-demand grammar checker, replacing the previously disabled proselint checker. Changes: - Created scripts/languagetool-flycheck wrapper for flycheck integration - Converts LanguageTool JSON output to flycheck format - Includes suggestions in error messages - 30-second timeout for large files - Updated modules/flycheck-config.el: - Defined languagetool checker for text/markdown/org/gfm modes - Updated cj/flycheck-prose-on-demand to use LanguageTool - Added installation instructions (sudo pacman -S languagetool) - Improved documentation clarity - Usage: Press C-; ? in org/text/markdown files - Enables flycheck with LanguageTool - Shows errors in *Flycheck errors* buffer - On-demand only (no performance impact) - Updated docs/NOTES.org: - Added best practice: Test Emacs launch after non-trivial changes - Example: emacs --eval "(kill-emacs)" - Catches startup errors before committing - Disabled weather debug mode (wttrin-debug nil) - Marked todo.org grammar checker task as DONE LanguageTool catches real grammar issues (subject-verb agreement, tense, punctuation, common mistakes) that proselint missed. Installation: LanguageTool 6.6 (222MB) from Arch repos Dependencies: Python 3 (for wrapper script) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'docs/NOTES.org')
-rw-r--r--docs/NOTES.org31
1 files changed, 31 insertions, 0 deletions
diff --git a/docs/NOTES.org b/docs/NOTES.org
index 7de74826..da8f573e 100644
--- a/docs/NOTES.org
+++ b/docs/NOTES.org
@@ -152,6 +152,36 @@ emacs --batch file.el --eval '(check-parens)' && echo "✓"
- Prevents committing broken code
- Example in chime.el repository: .git/hooks/pre-commit
+*** 5. Test Emacs Launch After Non-Trivial Changes
+**CRITICAL: Always test that Emacs launches without errors after making changes**
+
+After completing any non-trivial code changes (new modules, integrations, etc.):
+
+#+BEGIN_SRC bash
+# 1. Run unit tests (if applicable)
+make test
+
+# 2. Test that Emacs launches without backtrace
+emacs --eval "(kill-emacs)"
+#+END_SRC
+
+This catches:
+- Syntax errors in :command specifications
+- Missing dependencies at load time
+- Invalid use-package configurations
+- Broken requires/provides
+
+**When to do this:**
+- ✅ After adding new checker definitions (flycheck, flymake)
+- ✅ After creating new modules
+- ✅ After modifying init.el or early-init.el
+- ✅ Before committing changes
+- ✅ After running all unit tests
+
+**Example lesson:** The LanguageTool integration used =(eval (expand-file-name ...))= in
+a =:command= specification, which caused a backtrace on startup. Testing Emacs launch
+would have caught this immediately instead of discovering it on next restart.
+
** For Human Developers
*** 1. Use Structural Editing Modes
@@ -216,6 +246,7 @@ Deeply nested code:
| Writing | paredit/smartparens | Prevent errors |
| Editing | rainbow-delimiters | Visual verification |
| Testing | check-parens | Quick syntax check |
+| Testing | emacs --eval "(kill-emacs)" | Verify Emacs launches |
| CI/CD | pre-commit hooks | Prevent bad commits |
| Review | byte-compile-file | Comprehensive check |