From: Drew Adams <drew.adams@oracle.com>
To: Juri Linkov <juri@linkov.net>, Eli Zaretskii <eliz@gnu.org>
Cc: "philipk@posteo.net" <philipk@posteo.net>,
"rms@gnu.org" <rms@gnu.org>,
"spacibba@aol.com" <spacibba@aol.com>,
"emacs-devel@gnu.org" <emacs-devel@gnu.org>,
"monnier@iro.umontreal.ca" <monnier@iro.umontreal.ca>,
"arthur.miller@live.com" <arthur.miller@live.com>,
"dgutov@yandex.ru" <dgutov@yandex.ru>,
"ghe@sdf.org" <ghe@sdf.org>
Subject: RE: [External] : Re: Context menus and mouse-3
Date: Fri, 16 Jul 2021 20:05:09 +0000 [thread overview]
Message-ID: <SJ0PR10MB5488B431865FBA55A480CF57F3119@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <87o8b2nkys.fsf@mail.linkov.net>
> >> >> And some modes like org-mode, flyspell-mode, etc. already redefine
> >> >> down-mouse-3 to pop up context menus.
> >> >
> >> > But those modes define those context menus on special parts of
> >> > display, where pasting etc. makes less sense, no?
> >>
> >> When the buffer is not read-only, I see no reason to disallow
> >> pasting text because e.g. in flyspell-mode it makes sense
> >> to paste a correction to a misspelled word, etc.
> >
> > IMO, when mouse-3 is clocked on a misspelled word, it makes much more
> > sense to assume the user wants to fix that word than that the user
> > wants to paste.
> >
> > But here's an idea: how about merging the two menus into one in these
> > cases? We could add a top-level menu with the two alternatives, each
> > one would then drop down one of the two possible menus.
> > Alternatively, just make a long menu by concatenating the contents of
> > the two original ones.
> >
> > WDYT?
>
> Tak Kunihiro had a very good idea of using a hook-like variable
> that contains a list of functions that return parts of the whole
> context-menu, then these parts will be collected into the final menu.
FWIW -
`mouse3.el' has these variables:
`mouse3-region-popup-entries'
`mouse3-noregion-popup-entries'
`mouse3-region-popup-x-popup-panes'
`mouse3-noregion-popup-x-popup-panes'
Whether the first two or the second two are used is
controlled by option `mouse3-popup-x-popup-panes-flag'.
The difference corresponds to the two possibilities
offered by `x-popup-menu'. The default is nil, so you
can use keymaps and extended menu items to define the
`mouse-3' menu. The alternative is easy to use but
offers fewer possibilities.
The 2 `region' vars are used when the region is active.
The 2 `noregion' vars are used otherwise.
___
As for the choice of whether global menus should
be included in a `mouse-3' menu: Why decide that
at design time, hard-coding the behavior?
`mouse3.el' lets users decide, with option
`mouse3-popup-include-global-menus-flag'.
If non-nil then:
If the menu bar is visible then the major-mode menu
is the global menu to include on the `mouse-3' menu.
If the menu-bar is not shown then the menu-bar menus
are the menus to include on the `mouse-3' menu.
___
By default, the `mouse-3' menu has predefined submenus.
Users and code can modify the contents, of course.
(If the alternative panes approach is used, then the
operations are available in the single-level menu.)
These are the predefined submenus. All except the
first are for when the region is active and nonempty.
`mouse3-noregion-popup-misc-submenu'
Miscellaneous operations on a thing at mouse pointer:
Email, open, visit, Dired, find, describe, highlight etc.
`mouse3-region-popup-change-text-submenu'
Change the selected text:
Fill, indent, transpose regions, upcase, etc.
`mouse3-region-popup-check-convert-submenu'
Check, correct, or convert the selected text.
`mouse3-region-popup-copy-submenu'
Copy selected text: text props, kill, to register etc.
`mouse3-region-popup-highlight-submenu'
Highlight, unhighlight, copy/yank text props.
`mouse3-region-popup-misc-submenu'
Miscellaneous operations on selected text:
Count, narrow, eval, shell, write to file, etc.
`mouse3-region-popup-print-submenu'
Print, PostScript print, BNF PostScript operations.
`mouse3-region-popup-rectangle-submenu'
Selected rectangle: kill, delete, open, yank, clear, etc.
`mouse3-region-popup-register-submenu'
Selected text to register: copy to, delete to, etc.
`mouse3-region-popup-remove/replace-items'
Remove/replace selected text: kill, delete, yank.
`mouse3-region-popup-remove/replace-rect-submenu'
Remove/replace selected rectangle:
Clear, replace from last killed, string, register.
`mouse3-region-popup-search/replace-submenu'
Isearch, query replace etc.
next prev parent reply other threads:[~2021-07-16 20:05 UTC|newest]
Thread overview: 97+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-14 3:06 Context menus and mouse-3 [was: Changes for emacs 28] Drew Adams
2020-09-14 6:11 ` Ergus
2020-09-14 6:28 ` Stefan Monnier
2020-09-14 6:48 ` Ergus
2020-09-14 7:49 ` tomas
2020-09-14 7:58 ` Thibaut Verron
2020-09-14 8:29 ` tomas
2020-09-14 9:03 ` Thibaut Verron
2020-09-14 9:12 ` Göktuğ Kayaalp
2020-09-14 11:37 ` tomas
2020-09-14 12:36 ` Thibaut Verron
2020-09-14 15:59 ` Drew Adams
2020-09-14 15:12 ` Eli Zaretskii
2020-09-14 15:47 ` Drew Adams
2020-09-14 20:54 ` tomas
2020-09-15 4:35 ` Richard Stallman
2020-09-15 13:11 ` Stefan Monnier
2020-09-19 7:47 ` Tak Kunihiro
2020-09-19 8:02 ` Tak Kunihiro
2021-07-11 23:38 ` Context menus and mouse-3 Juri Linkov
2021-07-12 1:25 ` [External] : " Drew Adams
2021-07-12 11:55 ` Eli Zaretskii
2021-07-12 20:56 ` Juri Linkov
2021-07-13 0:19 ` [External] : " Drew Adams
2021-07-13 11:32 ` Eli Zaretskii
2021-07-13 23:46 ` Juri Linkov
2021-07-14 4:30 ` Eli Zaretskii
2021-07-14 23:37 ` Juri Linkov
2021-07-15 6:22 ` Eli Zaretskii
2021-07-15 22:23 ` Juri Linkov
2021-07-16 6:49 ` Eli Zaretskii
2021-07-16 18:59 ` Juri Linkov
2021-07-16 20:05 ` Drew Adams [this message]
2021-07-18 5:13 ` Tak Kunihiro
2021-07-18 15:53 ` Stefan Monnier
2021-07-19 15:55 ` Juri Linkov
2021-07-19 16:37 ` Stefan Monnier
2021-07-20 20:52 ` Juri Linkov
2021-07-20 22:24 ` Stefan Monnier
2021-07-20 23:15 ` Juri Linkov
2021-07-21 4:39 ` Tak Kunihiro
2021-07-21 5:07 ` [External] : " Drew Adams
2021-07-21 12:45 ` Stefan Monnier
2021-07-21 17:26 ` [External] : " Drew Adams
2021-07-22 3:49 ` Tak Kunihiro
2021-07-22 4:06 ` [External] : " Drew Adams
2021-07-19 19:59 ` Ergus via Emacs development discussions.
2021-07-20 20:51 ` Juri Linkov
2021-07-12 22:32 ` Stefan Monnier
2021-07-12 23:56 ` Juri Linkov
2021-07-13 3:01 ` Stefan Monnier
2021-07-13 23:32 ` Juri Linkov
2021-07-14 2:14 ` Stefan Monnier
2021-07-14 23:32 ` Juri Linkov
2021-07-15 1:18 ` Stefan Monnier
2021-07-15 22:31 ` Juri Linkov
2021-07-16 15:46 ` Stefan Monnier
2021-07-16 18:50 ` Juri Linkov
2021-07-16 19:25 ` Stefan Monnier
2021-07-15 6:24 ` Eli Zaretskii
2021-07-15 22:28 ` Juri Linkov
2021-07-16 6:51 ` Eli Zaretskii
2021-07-16 18:56 ` Juri Linkov
2021-07-16 23:13 ` Stefan Kangas
2021-07-17 6:22 ` Eli Zaretskii
2021-07-17 21:46 ` Juri Linkov
2021-07-17 6:02 ` Eli Zaretskii
2021-07-19 17:48 ` Stefan Kangas
2021-07-19 18:08 ` Stefan Monnier
2020-09-14 15:10 ` Context menus and mouse-3 [was: Changes for emacs 28] Eli Zaretskii
2020-09-14 16:42 ` Göktuğ Kayaalp
2020-09-14 8:15 ` Göktuğ Kayaalp
2020-09-14 8:33 ` tomas
2020-09-14 15:57 ` Drew Adams
2020-09-15 19:17 ` Juri Linkov
2020-09-15 20:33 ` Drew Adams
2020-09-15 22:47 ` Ergus via Emacs development discussions.
2020-09-16 0:29 ` Corwin Brust
2020-09-16 1:47 ` Drew Adams
2020-09-16 1:25 ` Drew Adams
2020-09-16 8:10 ` Ergus
2020-09-16 15:02 ` Drew Adams
2020-09-17 3:57 ` Richard Stallman
2020-09-17 20:10 ` Ergus
2020-09-17 21:58 ` Philip K.
2020-09-17 3:51 ` Richard Stallman
2020-09-16 14:13 ` Eli Zaretskii
2020-09-16 19:41 ` Juri Linkov
2020-09-16 2:24 ` Eli Zaretskii
2020-09-16 19:35 ` Juri Linkov
2020-09-16 23:10 ` Dmitry Gutov
2020-09-17 3:58 ` Richard Stallman
2020-09-17 7:48 ` Juri Linkov
2020-09-17 20:13 ` Ergus
2020-09-18 8:19 ` Juri Linkov
2020-09-18 10:53 ` Stefan Kangas
2020-09-19 4:01 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=SJ0PR10MB5488B431865FBA55A480CF57F3119@SJ0PR10MB5488.namprd10.prod.outlook.com \
--to=drew.adams@oracle.com \
--cc=arthur.miller@live.com \
--cc=dgutov@yandex.ru \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=ghe@sdf.org \
--cc=juri@linkov.net \
--cc=monnier@iro.umontreal.ca \
--cc=philipk@posteo.net \
--cc=rms@gnu.org \
--cc=spacibba@aol.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.