summaryrefslogtreecommitdiff
path: root/modules/mu4e-attachments.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-16 00:31:58 -0500
committerCraig Jennings <c@cjennings.net>2026-05-16 00:31:58 -0500
commitd384b3bb7abf7be1d6d66d06809ffdc98583ec83 (patch)
tree35aaa1926878b3c9f9f2b6de6600a4fb728d0297 /modules/mu4e-attachments.el
parent3236b5da26e1d92f17694601b31e9efae058a6ff (diff)
downloaddotemacs-d384b3bb7abf7be1d6d66d06809ffdc98583ec83.tar.gz
dotemacs-d384b3bb7abf7be1d6d66d06809ffdc98583ec83.zip
fix(ai-config): force tab-width=8 in gptel org-mode prompt buffers
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.
Diffstat (limited to 'modules/mu4e-attachments.el')
0 files changed, 0 insertions, 0 deletions