Yes, see transient-display-buffer-action
in Configuration. You can
also control how the popup buffer is displayed on a case-by-case basis
by passing :display-action
to transient-define-prefix
.
To be able to mark text in Transient’s popup buffer using the mouse, you have to add the below binding. Note that for technical reasons, the region won’t be visualized, while doing so. After you have quit the transient popup, you will be able to yank it in another buffer.
(keymap-set transient-predicate-map "<mouse-set-region>" #'transient--do-stay)
If your package only supports Emacs 30, just prefix the definition
with ;;;###autoload
. If your package supports released versions of
Emacs, you unfortunately have to use a long form autoload comment
as described in (elisp)Autoload.
;;;###autoload (autoload 'magit-dispatch "magit" nil t) (transient-define-prefix magit-dispatch () ...)
See https://github.com/magit/transient/wiki/Comparison-with-prefix-keys-and-universal-arguments.
See https://github.com/magit/transient/wiki/Comparison-with-other-packages.
You may have noticed that the bindings for some of the common commands do not have the prefix C-x and that furthermore some of these commands are grayed out while others are not. That unfortunately is a bit confusing if the section of common commands is not shown permanently, making the following explanation necessary.
The purpose of usually hiding that section but showing it after the user pressed the respective prefix key is to conserve space and not overwhelm users with too much noise, while allowing the user to quickly list common bindings on demand.
That however should not keep us from using the best possible key bindings. The bindings that do use a prefix do so to avoid wasting too many non-prefix bindings, keeping them available for use in individual transients. The bindings that do not use a prefix and that are not grayed out are very important bindings that are always available, even when invoking the “common command key prefix” or any other transient-specific prefix. The non-prefix keys that are grayed out however, are not available when any incomplete prefix key sequence is active. They do not use the “common command key prefix” because it is likely that users want to invoke them several times in a row and e.g., M-p M-p M-p is much more convenient than C-x M-p C-x M-p C-x M-p.
You may also have noticed that the “Set” command is bound to C-x s, while Magit-Popup used to bind C-c C-c instead. I have seen several users praise the latter binding (sic), so I did not change it willy-nilly. The reason that I changed it is that using different prefix keys for different common commands, would have made the temporary display of the common commands even more confusing, i.e., after pressing C-c all the bindings that begin with the C-x prefix would be grayed out.
Using a single prefix for common commands key means that all other potential prefix keys can be used for transient-specific commands without the section of common commands also popping up. C-c in particular is a prefix that I want to (and already do) use for Magit, and also using that for a common command would prevent me from doing so.
(See also the next question.)
I agree that q is a good binding for commands that quit something.
This includes quitting whatever transient is currently active, but it
also includes quitting whatever it is that some specific transient is
controlling. The transient magit-blame
for example binds q to the
command that turns magit-blame-mode
off.
So I had to decide if q should quit the active transient (like Magit-Popup used to) or whether C-g should do that instead, so that q could be bound in individual transient to whatever commands make sense for them. Because all other letters are already reserved for use by individual transients, I have decided to no longer make an exception for q.
If you want to get q’s old binding back then you can do so. Doing
that is a bit more complicated than changing a single key binding, so
I have implemented a function, transient-bind-q-to-quit
that makes the
necessary changes. See its documentation string for more information.