From 815eabd5c0eff1a866ef04f5aaa4e315f7206598 Mon Sep 17 00:00:00 2001 From: vindarel Date: Sat, 25 Apr 2026 01:37:07 +0200 Subject: [PATCH] transient: add Alt-x transient-always-show --- extensions/transient/popup.lisp | 6 +++++- extensions/transient/readme.org | 9 +++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/extensions/transient/popup.lisp b/extensions/transient/popup.lisp index 15463d62c..fe045b7eb 100644 --- a/extensions/transient/popup.lisp +++ b/extensions/transient/popup.lisp @@ -539,4 +539,8 @@ prefixes marked as :intermediate-p are flattened and shown with concatenated key (let ((resolved (resolve-transient-keymap))) (if resolved (show-transient resolved) - (hide-transient))))) \ No newline at end of file + (hide-transient))))) + +(define-command transient-always-show () () + "Show all current keybindings in a perpetual transient." + (setf *transient-always-show* (not *transient-always-show*))) \ No newline at end of file diff --git a/extensions/transient/readme.org b/extensions/transient/readme.org index 28eea28a2..98750170d 100644 --- a/extensions/transient/readme.org +++ b/extensions/transient/readme.org @@ -7,13 +7,14 @@ screen, that shows keybindings and their associated commands. The pop-up can stay in place when the user presses a key, which allows to always show help on-screen. -#+html:
[[ ]]
+#+html:
* Default behavior -Setting ~lem/transient:*transient-always-show*~ to ~t~ makes it show -everything but its not the default behavior. +Using `Alt-x transient-always-show` or setting ~lem/transient:*transient-always-show*~ to ~t~ +displays a transient that shows +every keybinding bound in the current keymap(s) (as seen in the screenshot above). Unless a specific mode enforces a transient keymap the default behavior is to not show anything. @@ -45,7 +46,7 @@ Defining a keymap with a few keys can be done like: Now when pressing =C-c t= you see the transient, offering you to press one key (and one is grayed out): -#+html:
[[ ]]
+#+html:
When you press =a=, the command =example-command= is called.