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: Tue, 13 Jul 2021 00:19:30 +0000 [thread overview]
Message-ID: <SJ0PR10MB54882CE6913FEA4FA1328978F3149@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <87pmvnuyug.fsf@mail.linkov.net>
> Nowadays every other app...
Nowadays every other app is still not Emacs.
Emacs is not just an app like every other app.
> uses down-mouse-3 to pop up a context menu,
> but in Emacs mouse-3 operates on the region.
By default, yes, Emacs does. And that's good.
Emacs selection-extension or deletion with a
right-click is a good feature.
> So the solution is...
No. So there are many "solutions" possible.
But solutions to what? The "problem" that Emacs
isn't like "every other app"?
No. Solutions (ways) to provide users with a
right-click context menu.
And the best of those solutions give users:
1. A way to get either the longstanding Emacs
default behavior or a context menu - au choix,
when they right-click. That means decide at
the moment you click.
2. A way to choose only context menus, foregoing
Emacs selection-extension/deletion behavior.
Library `mouse3.el' offers those user choices.
Wrt #1: By default you don't get a context menu
with a single right-click - you get the Emacs
selection-extension/deletion behavior. A second
click gives you the menu. So you can get either,
with the menu access costing you just a second
click at the same place.
Wrt #2: A user option lets you get the menu with
a single right-click. In that case, you lose the
usual selection-extension/deletion behavior (but
Emacs gives you other ways to extend/delete a
selection).
___
There's no use of a delay (which is the bane of
Emacs CUA fiddling) - except this: whatever delay
you've already defined for your mouse as defining
a double-click.
* If within that delay then Emacs (as always)
gives you a double-click behavior, which by
default is the same as the longstanding Emacs
behavior: kill/delete the (extended) selection,
according to `mouse-drag-copy-region'.
* If more than the double-click delay then you
get the menu.
(If you opt for a right-click to always give you
the menu immediately, then there's no second
click behavior and no double-click behavior.)
> similar to mouse-1-click-follows-link: to pop up a context menu
> after a delay, otherwise the immediate click operates on the region.
See above. I think the mouse3.el approach is
saner and better fits both Emacs itself and
users used to, and still preferring, only a
context menu.
> Every mode can define own [context-menu] in their mode-maps,
> then users will be able to customize mode's [context-menu]
> using mode hooks. Even text-properties could define
> the [context-menu] in their local bindings that will be used
> by '(current-local-map)' or better '(current-active-maps)'.
With mouse3.el there's no need for any of that -
no hooks, and no need for a special [context-menu]
pseudo-function key binding. It's simple to
define context menus for modes (or for anything).
> To be able to override the [context-menu], local bindings could use
> text-property maps with another binding named [overriding-context-menu]
> that will replace the whole composite [context-menu], so e.g.
> flyspell-mode could put it on misspelled words, etc.
And no need for any of that - overriding with
text-property maps, additional pseudo-function
bindings, etc. Instead, just bind variable
`mouse3-save-then-kill-command' to the behavior
you want - in any context or from any bit of code.
It can do anything you like, including provide
another menu (minor mode behavior or whatever).
next prev parent reply other threads:[~2021-07-13 0:19 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 ` Drew Adams [this message]
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 ` [External] : " Drew Adams
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=SJ0PR10MB54882CE6913FEA4FA1328978F3149@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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).