Tor-björn Claesson <[email protected]> writes: > Ihor Radchenko <[email protected]> writes: >> Maybe some menus can say :menu-systems '(transient) to force using >> transient even when other menu-backend is specified by user. That option >> might be exposed to users. Then, we can easily incorporate >> transient-only menus or even menus that employ a completely custom menu >> implementation. It feels like an easy generalization that does not >> require too much effort. > > I did a very simple implementation of this, which allows specifying > precisely one forced menu system, or also a variable where the menu > system could be set (e.g. org-menu-system as default).
With your code, if user changes org-menu-system value manually, at run time, after some menu is loaded, the change will be ignored. >> Hmm. What about replacing :contents with :menu? > Sure, maybe even menu-contents, but lets go with menu. > >> Also, :interactive-spec seems misleading. It is basically function body. >> What about defining it as &body? It feels intuitive. >> > I'm feeling stupid about this - I have an unreasonably difficult time > getting &key and &body to play well, so I chickened out and just renamed > the interactive-spec keyword to body. I looked at it and again caught by this CL-specific convention. The main issue you may be running into is the fact that &body, if specified (and you have to add &allow-other-keys, to make &body combine with &key), will not only include body, but also every keyword argument. > Otherwise, does this start to be in such a shape that I should write > the NEWS entry? I think we can. In addition, I would try to implement org-attach menu using the new system. org-attach menu is more or less a keymap menu (with buffer popup). It should be possible to translate to transient or simple menu. But there is a twist - the attach keymap is dynamically generated from (mapcar #'caar org-attach-commands). -- 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>
