-
This nested, matrix-like, two-dimensional transient works fine: (defun example () (interactive) (message "example"))
(transient-define-prefix example-static ()
[ [ "Left column"
("d" "d" example :transient t)
("f" "f" example :transient t)]
[ "Right column"
("j" "j" example :transient t)
("k" "k" example :transient t)]]) But I want to determine the groups dynamically, when the transient is called. I tried this: (transient-define-prefix example-dynamic ()
[ :setup-children
(lambda (_)
(transient-parse-suffixes
'not-sure-about-this
[ :class transient-row
[ "Left column"
("d" "d" example :transient t)
("f" "f" example :transient t)]
[ "Right column"
("j" "j" example :transient t)
("k" "k" example :transient t)]]))]) But it calling this transient results in this error:
I also tried other variations. For example, when I remove
What am I doing wrong? How can I dynamically build a two-dimensional transient? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
(transient-define-prefix example-dynamic ()
[:class transient-columns
:setup-children
(lambda (_)
(transient-parse-suffixes
'example-dynamic
'(["Left column"
("d" "d" transient-echo-arguments :transient t)
("f" "f" transient-echo-arguments :transient t)]
["Right column"
("j" "j" transient-echo-arguments :transient t)
("k" "k" transient-echo-arguments :transient t)])))])
Such layouts have to use the When using Using I'll have to think about how to make it more obvious in the manual. I might also add an example. |
Beta Was this translation helpful? Give feedback.
Such layouts have to use the
transient-columns
group type, there is no other group type that supports more than one dimension.When using
:setup-children
the class has to be specified but you picked th…