Replies: 2 comments
-
This could proof rather difficult and fragile. It seems it would be better to read that value before calling |
Beta Was this translation helpful? Give feedback.
0 replies
-
It seems it would be better to read that value before calling `transient-setup` and then passing the read value using `:scope`. (`transient-define-prefix` can be called with an explicit body to achieve that, instead of relying on the default body that is used when none is specified.)
Thank you for the response @tarsius! I'll try using the :scope, following the example of magit-branch-configure.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there a way to automatically run an infix belonging to a prefix after setting up the prefix with
transient-setup
?In this transient:

I'd like to save a keystroke by automatically running the
d
option ("Rewrite instruction"), which prompts for a string from the minibuffer. (The prefix code is here, and the infix that needs to run is right after.)I was thinking of running the infix from a self-removing
transient-setup-buffer-hook
, but I couldn't tell from the code if this hook runs too early in the process for this. I'm also not sure how to run the infix programmatically, since (i) its function definition is justtransient-default-infix-command
and (ii) it's marked as interactive-only.Any idea what the best way to go about this would be?
Beta Was this translation helpful? Give feedback.
All reactions