Tor-björn Claesson <tclaes...@gmail.com> writes: >> 1. Define a set of variables: >> + <menu-name>-actions (if actions is not already a variable) >> + <menu-name>-default-action (if not already a variable) >> + <menu-name>-display (...) > Yes, this is much nicer than putting those in org-menu- alists! > >> + <menu-name>-menu-system (...) >> + <menu-name>-switch (...) > If we end up with many menus, and I would like to use e.g. embark > everywhere instead of the default, then it would be tedious to change > all of these. > > Would it be a good idea to have org-menu-default-menu-system and > org-menu-default-switch, make <menu-name>-menu-system and > <menu-name>-switch be nil by default, and if they are nil use the values > of org-menu-default-menu-system and org-menu-default-switch > respectively? > > This way, it would be easy to change the defaults globally, but also > possible to customize them per menu.
Maybe we start simple, and just have a single global setting for menu-system and switch. If a need arises, we can add per-menu customization. If further need arises, we introduce "override" version of global setting. > My preliminary plan for this was to keep using transient-define-prefix > to create the <menu-name> command, this way we get the transient "for > free", but change the body to something like > > (cond ((<switch logic>) <do default action>) > ((<menu system is 'transient>) <set up transient and scope>) > (t (org-menu--show-menu <menu system> <menu-name> args actions))) > > Would this be OK? Yes. > I am currently a bit swamped with soon upcoming state exams in pediatric > radiology, finishing an article and my doctoral thesis. However, I really > enjoy > learning about elisp, appreciate your guidance, and will make sure to > find time for this work (but I will be a bit slow). No problem. I am happy to see consistent (even if slow) progress. That's much better than no progress at all. -- 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>