diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-18 02:24:30 -0400 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-18 02:24:30 -0400 |
| commit | b3d41f9a0c63b13ad497a48677de933a3fb5a5cf (patch) | |
| tree | 7ae88ce89ace3a3ada41f3673703f740b51c0093 /tests/testutil-ai-config.el | |
| parent | 3aa577665329200c90c17db2c949acb45514c29b (diff) | |
| download | dotemacs-b3d41f9a0c63b13ad497a48677de933a3fb5a5cf.tar.gz dotemacs-b3d41f9a0c63b13ad497a48677de933a3fb5a5cf.zip | |
refactor(ai-config): switch gptel to local fork, drop tab-width advice
I switched the gptel use-package form to `:load-path "~/code/gptel"`
with `:ensure nil` so Emacs loads from the fork instead of the MELPA
release. The fork now carries the narrow `tab-width' copy in
`gptel-org--create-prompt' that karthink redirected the upstream PR
to, which replaces the local `:around' advice on
`gptel--with-buffer-copy-internal' I'd been carrying.
I also dropped the stale test file
`tests/test-ai-config-gptel-prompt-tab-width.el' and the matching
stub in `tests/testutil-ai-config.el'. Both existed only to test the
advice I removed.
Diffstat (limited to 'tests/testutil-ai-config.el')
| -rw-r--r-- | tests/testutil-ai-config.el | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/tests/testutil-ai-config.el b/tests/testutil-ai-config.el index f56a38e1..c7486222 100644 --- a/tests/testutil-ai-config.el +++ b/tests/testutil-ai-config.el @@ -74,21 +74,6 @@ ;; so the magit integration only activates when magit is provided. ;; See test-ai-config-gptel-magit-lazy-loading.el for magit stub tests. -;; Stub `gptel--with-buffer-copy-internal' so the advice attached to it -;; in ai-config.el can be exercised without loading real gptel-request. -;; Mirrors the salient bits of the real function (gptel-request.el:945): -;; create a temp buffer, copy major-mode as a symbol (no hooks), call -;; body-thunk inside. See test-ai-config-gptel-prompt-tab-width.el. -(unless (fboundp 'gptel--with-buffer-copy-internal) - (defun gptel--with-buffer-copy-internal (buf _start _end body-thunk) - "Stub: create temp buffer, copy major-mode from BUF, run BODY-THUNK." - (let ((temp (generate-new-buffer " *gptel-prompt-stub*" t))) - (unwind-protect - (with-current-buffer temp - (setq major-mode (buffer-local-value 'major-mode buf)) - (funcall body-thunk)) - (kill-buffer temp))))) - ;; Stub ai-conversations (provide 'ai-conversations) |
