Guidance on Dynamically Generating Sub-menus #301
Replies: 2 comments 1 reply
-
What exactly did you have in mind with "sub-menus"? Here's some ways this could be done (though not all of that is actually supported yet).
Most faithful port, which doesn't need any new functionality in Transient, would look like:
Or maybe you want real "submenus", starting with a "topmenu" like
and then after typing
Or the "as ..." commands could be hidden, similar to how the "common commands" are hidden in all menus, until the common prefix Starting with a menu looking like the one in the previous variant, and also after typing
|
Beta Was this translation helpful? Give feedback.
-
Thanks for the response! I was actually thinking more in line with sub-menus being “real menus” (implemented as prefixes). For example using
Selecting
Arguably the sub-menu could support groups to support the layout above. IMHO, the flattened menu example doesn’t provide any benefit over the current Org implementation. I’d argue that sub-menus offer the benefit of constraining user focus to choices that are available as the user makes decisions. |
Beta Was this translation helpful? Give feedback.
-
Asking for guidance on how one could dynamically generate sub-menus using Transient. Solving this would enable an Transient-based implementation of the
org-capture
command.In particular if the variable
org-capture-template
is configured so thatkeys
are two or more characters are specified, then a sub-menu is generated.Drawing from the example provided in transient-showcase, I was able to get this simple example code working for one level of dynamic menu generation. It is not clear to me what direction should be taken to extend this to support sub-menus.
Would appreciate any input on this matter.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions