On Sat, 12 Sep 2020 at 05:15, Ergus <spacibba@aol.com> wrote:
I want to clarify an important detail here. Right click is expected to
display a *context menu* and the context menu is expected to contain
commands that are related to the object that received the right click.
This does not always correlate with “the most common operations”.
Right-clicking a misspelled word offers a list of possible
corrections. Right-clicking with a highlighted region offers Cut and
Copy. (Actually, Cut/Copy/Paste are always on the context menu for
text editors, and get enabled/disabled depending on availability.) In
a programming mode, right-clicking an identifier could offer
xref-find-definitions and xref-find-references.
Applications made with greater attention to UI design also extend the
context menu functionality to other UI elements. Right-clicking a
toolbar offers to hide or customize it. Right-clicking a tab offers to
save or close the document.
Implementing a context menu in Emacs is not a simple matter of binding
<mouse-3> to any of the menus displayed by <C-mouse-1…3>. Someone™
needs to pick things that are relevant in each context. More likely,
each major mode needs to pick things that are appropriate in its
buffers.