|
From: | Juri Linkov |
Subject: | Re: [RFC] The best way to choose an "action" at point: context-menu-mode, transient, which-key or embark? |
Date: | Sat, 14 Dec 2024 19:53:36 +0200 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) |
> 1. List of possible actions: ((name1 . action1 props) (name2 . action2 ...) > ...) > PROPS is a plist defining extra properties like key-binding, display > string, maybe something else to be used in the future. > 2. Menu interface to use (transient, context-menu, embark, which-key) This looks like the best design. Any part of the org buffer could have text properties with a list of its available actions. Such a property could be similar to 'context-menu-functions' handled by 'context-menu-map'. But since it will be a plain generic list, it could be transformed to any menu interface such as transient, context-menu, etc. To transform it to context-menu, org-mode should provide a function like 'context-menu-minor' that will create a corresponding menu that will be added as a submenu of the default context menu. Such integration with existing menus would be better than the current implementation of context menus in org-mouse-context-menu that completely replaces the context menu with its own.
[Prev in Thread] | Current Thread | [Next in Thread] |