GNU bug report logs -
#38013
[PATCH] Rectangular region selection with mouse
Previous Next
Reported by: Mattias EngdegÄrd <mattiase <at> acm.org>
Date: Thu, 31 Oct 2019 23:11:01 UTC
Severity: wishlist
Tags: patch
Fixed in version 27.1
Done: Noam Postavsky <npostavs <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #59 received at 38013 <at> debbugs.gnu.org (full text, mbox):
> 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
This bug report was last modified 5 years and 137 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.