transient icon indicating copy to clipboard operation
transient copied to clipboard

Non-argument Values from Prefix

Open psionic-k opened this issue 4 years ago • 1 comments

Currently the transient-arguments ignores lisp variables and other variable types. Getting the values out of a prefix is honestly pretty painful if the expectation was to call (transient-variables 'prefix-symbol) and obtain a plist of keys and values. Even keys and suffixes would be nice. Digging the information out of transient-current-suffixes is not convenient or obvious. transient-arg-value seems appropriate only for extracting CLI style information.

psionic-k avatar Oct 04 '21 10:10 psionic-k

I realized what needs to happen here has a bit of a relationship with flow control.

Emacs commands generally use cooperative argument passing - if the arguments are not passed in, the interactive form knows how to get them from the user.

We could use a simple expression to recover the values when launching a child prefix and then also look for "return" values when re-entering a parent prefix. I need to verify if transient-setup will re-enter the commands whenever the stack is popping.

Flow control change in #167 is related

Basically I think we can streamline cooperative argument passing between child and parent prefixes so that there is a "scope" throughout the life of transient prefix graphs. I was drawing up a few designs. There's a lot to consider about having a child set a parents switch, accumulation of values in long command graphs that might happen if, for instance, you made transient for tetris. Want to keep it clean but support reasonable user API's. Haven't decided yet.

psionic-k avatar Oct 21 '21 10:10 psionic-k