Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve paging hint #370

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

crzcrz
Copy link

@crzcrz crzcrz commented Apr 9, 2024

This PR attempts to improve the paging hint displayed when all key bindings do not fit on the screen.

  • Avoid suggesting C-h when it will certainly not work,
  • Suggest alternatives that were previously not offered (? and <f1>),
  • Suggest custom bindings to 'which-key-C-h-dispatch (when present).

This should improve the experience for newcomers a bit.

Tested under clean Emacs 29.3 and Doom v3.0.0-pre from yesterday.

When testing today I've noticed that C-h C-h now works under Doom and displays the paging prompt, while it certainly did not when I submitted #368, and it still does not in "clean" Emacs. However in the original implementation we would not display any paging hint at all, so I don't think we are making anything worse.

Closes #368

* which-key.el (which-key--next-page-hint): avoid suggesting C-h when it
is known not to work; suggest alternatives that are likely to work.
@justbur
Copy link
Owner

justbur commented Apr 23, 2024

Thanks. Sorry for not asking earlier, but have you assigned your copyright to the FSF (see here)?

@crzcrz
Copy link
Author

crzcrz commented Apr 30, 2024

It’s in progress.

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.

Paging hint suggests C-h even when it's bound under given prefix and won't work
2 participants