Juri Linkov <j...@linkov.net> writes: > Then you can use something like the buffer-local variable with the > same name 'context-menu-functions' (handled in 'context-menu-map'). > The main point is that these functions return a menu. > > But instead of a menu, an org function could return > a more high-level data structure like > ((name1 . action1 props) (name2 . action2 ...) ...) > > IOW, this means adding an abstraction layer on top of the existing > user interfaces such as transient and context-menu.
Yeah. I am not 100% sure if adding an abstraction layer is a great idea. Another idea I was considering is similar to what you propose: have some kind of hook like `context-menu-functions', but accepting an extra argument - menu type (context menu, transient, which-key, etc.). Then, it should produce appropriate menu spec. However, this will require Elisp to customize things. Also not ideal. -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>