Skip to content

Fix pi menu on Emacs 29 with newer Transient#198

Closed
dnouri wants to merge 1 commit into
masterfrom
fix-emacs29-transient-text-conversion
Closed

Fix pi menu on Emacs 29 with newer Transient#198
dnouri wants to merge 1 commit into
masterfrom
fix-emacs29-transient-text-conversion

Conversation

@dnouri
Copy link
Copy Markdown
Owner

@dnouri dnouri commented Apr 27, 2026

Opening pi-coding-agent-menu on Emacs 29 can fail before the menu is shown when a newer Transient runs its Emacs 30 text-conversion setup path. Emacs 29 does not define text-conversion-style or overriding-text-conversion-style, so Transient can signal (void-variable text-conversion-style) during transient-setup.

This fixes the real menu path, not just the tests:

  • route pi's Transient prefix commands through a small helper;
  • on Emacs 29 only, dynamically bind Transient's Emacs 30 text-conversion symbols to nil while transient-setup runs;
  • leave Emacs 30+ untouched and avoid broad global defvar compatibility shims;
  • keep suffix-layout tests focused on suffix initialization, and add a command-path regression test that would fail before the runtime shim.

Checks:

  • Reproduced the user-facing M-x pi-coding-agent-menu failure in emacs -nw on Emacs 29 before the runtime fix.
  • Verified the same M-x pi-coding-agent-menu path displays the menu in emacs -nw on Emacs 29 after the fix.
  • Ran the focused Emacs 29 menu suite with a clean package setup.
  • Ran the full local check target on Emacs 29 with a clean package setup.

@dnouri dnouri force-pushed the fix-emacs29-transient-text-conversion branch from 800ffd3 to 1b61c92 Compare April 27, 2026 14:34
Opening pi-coding-agent-menu on Emacs 29 can fail before the menu is shown when newer Transient runs its Emacs 30 text-conversion setup path.  Emacs 29 does not define text-conversion-style or overriding-text-conversion-style, so Transient can signal a void-variable error during transient-setup.

Route pi's Transient prefix commands through a narrow setup helper that dynamically binds those Emacs 30-only symbols to nil only while Transient sets up the pi menus on Emacs 29.  This avoids broad global compatibility definitions and leaves newer Emacs versions untouched.

Keep menu-structure tests focused on suffix initialization and add a command-path regression test that would fail before the runtime shim.
@dnouri dnouri force-pushed the fix-emacs29-transient-text-conversion branch from 1b61c92 to 7641675 Compare April 27, 2026 14:48
@dnouri dnouri changed the title Avoid Transient display setup in menu tests Fix pi menu on Emacs 29 with newer Transient Apr 27, 2026
@dnouri dnouri closed this Apr 27, 2026
@dnouri dnouri deleted the fix-emacs29-transient-text-conversion branch May 5, 2026 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant