[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#38013: [PATCH] Rectangular region selection with mouse
From: |
martin rudalics |
Subject: |
bug#38013: [PATCH] Rectangular region selection with mouse |
Date: |
Thu, 7 Nov 2019 20:08:55 +0100 |
> I don't think so; being able to select from a menu with a single
> dragging movement is not only more ergonomic, it's the expected
> behaviour of pop-up menus.
But by doing so it usurps all combinations of the control key and
mouse-1. So we pay a high price for such a small convenience. And
since I have never anywhere else seen a "context" menu pop up right
after a mouse press I would not consider it the expected behavior.
> mouse.el even contains a comment to that
> effect:
>
> ;; By binding these to down-going events, we let the user use the up-going
> ;; event to make the selection, saving a click.
In all those 25 or more years it hasn't found its way into the Emacs
manual though.
> You can try for yourself: with the patch applied, bind M-mouse-1 to a menu:
>
> (global-set-key [M-mouse-1] 'mouse-buffer-menu)
>
> Now a single meta-click will open the menu, and meta-drag will mark
> a rectangle. This sort of multiplexing doesn't feel right, and
> affects both uses negatively.
But the same "multiplexing" already applies for operating the mouse
without any modifiers. And I sometimes use it in a different context:
When I prematurely press the mouse button on a browser link, I can
always bow out by slightly moving the mouse, thus avoiding the
semantics of a click.
> For example, suppose you have marked a rectangle and change your
> mind. Intuitively, you will click somewhere to make the mark go
> away, using the same modifiers. But that doesn't work, because now
> you get a pop-up menu.
The menu should pop up iff the down and up events happen at the same
location. Can we agree that this is hard to achieve after having
marked a rectangle?
> Emacs's mouse bindings seem rather haphazard and organised mainly on
> the principle of first-come, enshrining a fair bit of historical
> baggage. For example, there are two different buffer menus (one for
> font and one for everything else). There is also the secondary
> selection, of which there seems to be much fewer actual users than
> people who just want to know how to disable it.
Most applications I know do not even distinguish mouse and meta mouse
clicks so I doubt that many users will see this as a problem.
> We could do worse than following some conventions that have become
> more or less universal, such as right-clicking (control-click on
> macOS) for a context menu.
For me mouse-3 is the preferred button to pop up a menu. I never use
mouse-3 to extend the selection because I'm not used to switch mouse
buttons during one and the same action.
> That said, do you have any particular reason (precedence,
> ergonomics) for suggesting control-shift? I'd rather use meta and
> move secondary selection to shift-meta (say).
I suggested control-shift because it's IMHO the most convenient
combination with two modifiers (at least on my past and present
keyboards). And I wouldn't change default key bindings that have
existed for decades. But since I never use the secondary selection I
cannot really defend it either.
martin
- bug#38013: [PATCH] Rectangular region selection with mouse, (continued)
- bug#38013: [PATCH] Rectangular region selection with mouse, Drew Adams, 2019/11/03
- bug#38013: [PATCH] Rectangular region selection with mouse, martin rudalics, 2019/11/04
- bug#38013: [PATCH] Rectangular region selection with mouse, Mattias Engdegård, 2019/11/04
- bug#38013: [PATCH] Rectangular region selection with mouse, Drew Adams, 2019/11/04
- bug#38013: [PATCH] Rectangular region selection with mouse, martin rudalics, 2019/11/04
- bug#38013: [PATCH] Rectangular region selection with mouse, Mattias Engdegård, 2019/11/04
- bug#38013: [PATCH] Rectangular region selection with mouse, martin rudalics, 2019/11/05
- bug#38013: [PATCH] Rectangular region selection with mouse, Mattias Engdegård, 2019/11/07
- bug#38013: [PATCH] Rectangular region selection with mouse, Drew Adams, 2019/11/07
- bug#38013: [PATCH] Rectangular region selection with mouse, Mattias Engdegård, 2019/11/07
- bug#38013: [PATCH] Rectangular region selection with mouse,
martin rudalics <=
- bug#38013: [PATCH] Rectangular region selection with mouse, Drew Adams, 2019/11/07
- bug#38013: [PATCH] Rectangular region selection with mouse, Mattias Engdegård, 2019/11/08
- bug#38013: [PATCH] Rectangular region selection with mouse, martin rudalics, 2019/11/08
- bug#38013: [PATCH] Rectangular region selection with mouse, Mattias Engdegård, 2019/11/09
- bug#38013: [PATCH] Rectangular region selection with mouse, Eli Zaretskii, 2019/11/09
- bug#38013: [PATCH] Rectangular region selection with mouse, Mattias Engdegård, 2019/11/09
- bug#38013: [PATCH] Rectangular region selection with mouse, Eli Zaretskii, 2019/11/09
- bug#38013: [PATCH] Rectangular region selection with mouse, Mattias Engdegård, 2019/11/10
- bug#38013: [PATCH] Rectangular region selection with mouse, Mattias Engdegård, 2019/11/12
- bug#38013: [PATCH] Rectangular region selection with mouse, Drew Adams, 2019/11/12