Fix: Remove confusing <remap> entry from keypad display#765
Fix: Remove confusing <remap> entry from keypad display#765Kaylebor wants to merge 1 commit intomeow-edit:masterfrom
Conversation
The keypad display was showing a "<remap>" entry that confused users. This entry is created by suppress-keymap to prevent self-insert-command, but it's an implementation detail that shouldn't be visible in the UI. The fix removes the remap entry from the display keymap after building it, while preserving the actual suppression functionality. Fixes the issue where users see "<remap>" in the keypad when pressing SPC.
|
This is probably good... I just have one concern: this is only removing I guess this perhaps signals a need for better abstraction for making keymaps, but we can worry about that after we sort out specifics.
I'm not sure I understand why this is true. This is modifying the actual keymap used by both display backends. Could Also, it seems that which-key filters this out which explains why I haven't seen this before. It's probably ok to let the legacy display function have some artifacts. When I was testing it out just now it's pretty apparent that there are many other display issues that make it look worse in subtle ways compared to which-key. |
|
To be fair I am not that familiar with the codebase, I mostly focused down on fixing a particular issue I was having and decided to open a PR once it was good; it's kind of accidental that this surfaced other issues too 😅 The specific issue I was having was that I was playing around with Meow and which-key, trying to ensure that +prefix values had proper names, and found that on the top level (and some nested levels) a While I am using this PR right now, and it appears to work, I am also just starting to get into meow (I come from Evil, which in my config manages to freeze Emacs, so here we are!). So there's probably a better approach to fix this, or there may be some way to configure which-key which avoids this issue altogether? |
|
Hmm, I was not able to reproduce getting a remap entry using which-key although I only tried halfheartedly. If you could explain how to reproduce it that might help. |
Summary
This PR fixes an issue where the Meow keypad displays a confusing
<remap>entry when users press SPC to view available commands.Problem
When pressing SPC in Meow normal mode, the keypad shows an entry labeled
<remap>alongside the actual commands. This entry:<remap>key)suppress-keymapSolution
The fix removes the remap entry from the display keymap after it's built, while preserving the actual key suppression functionality. The remap entry (which prevents character insertion) still exists in the functional keymap, it's just filtered out from what users see.
Testing
<remap>entry appears in the keypad displayTechnical Details
suppress-keymapadds a[remap self-insert-command] -> undefinedentry to prevent character insertion. This is correct behavior for a command keymap, but the entry shouldn't be shown to users as it's not an actionable command.The fix uses
assq-delete-allto remove the remap symbol from the display keymap structure after building it.