diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-16 01:31:36 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-16 01:31:36 -0500 |
| commit | 1ca46c2b477afd014ef993ed0ca5ca50e257adce (patch) | |
| tree | 66ddfecc234c18f8d90e6e7908204de0afd3e3d2 /modules/custom-datetime.el | |
| parent | 531f0f19f298e28b42dfb216f6008a1cbc6164d3 (diff) | |
| download | dotemacs-1ca46c2b477afd014ef993ed0ca5ca50e257adce.tar.gz dotemacs-1ca46c2b477afd014ef993ed0ca5ca50e257adce.zip | |
fix(ai-config): hook gptel-magit wiring per-feature, not on magit
The wiring keyed on `with-eval-after-load 'magit` fires while two
of its three references are still undefined. `magit.el` calls
`(provide 'magit)` BEFORE its `cl-eval-when (load eval)` block
requires `magit-commit` and `magit-stash`. At that moment the
`magit-commit` transient prefix doesn't exist, and
`transient-append-suffix` silently no-ops on missing prefixes
(default `transient-error-on-insert-failure` is nil). The "g
Generate commit" and "x Explain" suffixes never landed. Only the
M-g binding worked, because `git-commit` IS required before
provide.
Three per-feature hooks replace the single `'magit` hook: one each
on `git-commit`, `magit-commit`, and `magit-diff`. Each hooks the
exact dependency the wiring needs, side-stepping the load-order
race entirely.
The companion test was rewritten to check `after-load-alist`
registration rather than drive the hooks through `provide`. Emacs
30 batch mode doesn't fire registered `eval-after-load` callbacks
on `provide` alone -- only an actual `load` does. Inspecting the
registration is the stronger guard anyway: the regression is "a
single `'magit` hook," and the right shape of that check is "no
entry under `magit`, entries under `git-commit`, `magit-commit`,
`magit-diff`."
Diffstat (limited to 'modules/custom-datetime.el')
0 files changed, 0 insertions, 0 deletions
