<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dotemacs/tests/testutil-ai-config.el, branch main</title>
<subtitle>My Emacs configuration
</subtitle>
<id>https://git.cjennings.net/dotemacs/atom?h=main</id>
<link rel='self' href='https://git.cjennings.net/dotemacs/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/'/>
<updated>2026-05-18T06:24:30+00:00</updated>
<entry>
<title>refactor(ai-config): switch gptel to local fork, drop tab-width advice</title>
<updated>2026-05-18T06:24:30+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-18T06:24:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=b3d41f9a0c63b13ad497a48677de933a3fb5a5cf'/>
<id>urn:sha1:b3d41f9a0c63b13ad497a48677de933a3fb5a5cf</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>fix(ai-config): force tab-width=8 in gptel org-mode prompt buffers</title>
<updated>2026-05-16T05:31:58+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-16T05:31:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=d384b3bb7abf7be1d6d66d06809ffdc98583ec83'/>
<id>urn:sha1:d384b3bb7abf7be1d6d66d06809ffdc98583ec83</id>
<content type='text'>
gptel's `gptel--with-buffer-copy-internal` copies the source buffer's `major-mode` symbol but doesn't run mode hooks. An inherited-org-mode prompt buffer keeps `tab-width` at this config's global default of 4 instead of the 8 that `org-mode-hook` would set. When gptel later parses the prompt buffer with `org-element`, Org's `tab-width=8` guard raises "Tab width in Org files must be 8, not 4."

I was hitting this on every second `gptel-magit-generate-message` from COMMIT_EDITMSG. `vc-config.el` sets `git-commit-major-mode 'org-mode'`, and the diffs contained list-shaped content that `org-element--list-struct` parsed.

The advice forces `tab-width=8` in the prompt buffer when its inherited mode is org-mode. It's a local workaround for an upstream gap. An upstream patch to run `(delay-mode-hooks (funcall major-mode))` in the buffer-copy is the real fix. I'll send it next.
</content>
</entry>
<entry>
<title>Move GPTel tool loading into AI config</title>
<updated>2026-05-10T07:43:48+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-10T07:43:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=0248afe222a0722ec336e8c09269612eb773702b'/>
<id>urn:sha1:0248afe222a0722ec336e8c09269612eb773702b</id>
<content type='text'>
Move the local GPTel tool wiring out of init.el and into ai-config. The tools directory and feature list are now configurable, missing optional tools are non-fatal, and focused tests cover the loading behavior.
</content>
</entry>
<entry>
<title>refactor(gptel): lazy-load gptel-magit, rebind rewrite/context keys</title>
<updated>2026-03-07T03:15:31+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-03-07T03:15:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=2faf32bcc5107312e6f9066489fb93e41e5fbaa8'/>
<id>urn:sha1:2faf32bcc5107312e6f9066489fb93e41e5fbaa8</id>
<content type='text'>
- Replace use-package gptel-magit hook with autoloads via
  with-eval-after-load 'magit (loads gptel only on key press)
- Move org header defuns above use-package to fix load order
- Set gptel-include-reasoning to "*AI-Reasoning*" buffer
- Rebind rewrite to C-; a r, clear context to C-; a c
- Add test-ai-config-gptel-magit-lazy-loading.el (8 tests)
- Mark all ai-config cleanup items DONE in todo.org
</content>
</entry>
<entry>
<title>test(gptel): add unit tests for ai-config, remove dead cj/gptel-backends</title>
<updated>2026-03-07T02:40:23+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-03-07T02:40:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=1fc3a444910e27228dfa1b96d630413ddf31e9b9'/>
<id>urn:sha1:1fc3a444910e27228dfa1b96d630413ddf31e9b9</id>
<content type='text'>
- Add testutil-ai-config.el with gptel stubs for batch testing
- Add tests for cj/gptel--model-to-string (9 tests)
- Add tests for cj/gptel--fresh-org-prefix (8 tests)
- Add tests for cj/gptel-backend-and-model (8 tests)
- Remove dead cj/gptel-backends defvar (duplicates cj/gptel--available-backends)
</content>
</entry>
</feed>
