Fix pi menu on Emacs 29 with newer Transient#198
Closed
dnouri wants to merge 1 commit into
Closed
Conversation
800ffd3 to
1b61c92
Compare
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.
1b61c92 to
7641675
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Opening
pi-coding-agent-menuon 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 definetext-conversion-styleoroverriding-text-conversion-style, so Transient can signal(void-variable text-conversion-style)duringtransient-setup.This fixes the real menu path, not just the tests:
nilwhiletransient-setupruns;defvarcompatibility shims;Checks:
M-x pi-coding-agent-menufailure inemacs -nwon Emacs 29 before the runtime fix.M-x pi-coding-agent-menupath displays the menu inemacs -nwon Emacs 29 after the fix.