GNU bug report logs - #38013
[PATCH] Rectangular region selection with mouse

Previous Next

Package: emacs;

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


View this message in rfc822 format

From: martin rudalics <rudalics <at> gmx.at>
To: Mattias Engdegård <mattiase <at> acm.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 38013 <at> debbugs.gnu.org
Subject: bug#38013: [PATCH] Rectangular region selection with mouse
Date: Tue, 5 Nov 2019 10:35:30 +0100
> The rectangle-mark code can perhaps be rewritten to work that way,

Any code based on mouse dragging should be written in such way that
the corresponding click event can be easily handed over to a separate
command.  That's what the drag- prefix is for.

> but doesn't it force the pop-up menu to be used with
> click-release-select-click-release instead of the quicker
> click-select-release?

Yes and I think that the former is the correct and expected behavior.
I don't use the buffer menu but if I did I were much more annoyed by
the fact that when I abandon the selection by clicking somewhere else
I get an active region which I then have to click away in a further
step.

Note that even the Emacs manual itself confuses down-mouse events and
clicks as

  ‘C-mouse-1’
     This menu is for selecting a buffer.

     The MSB (“mouse select buffer”) global minor mode makes this menu
     smarter and more customizable.  *Note Buffer Menus::.

and

  It replaces the ‘mouse-buffer-menu’ commands, normally bound to
  ‘C-Down-mouse-1’

IMHO the rule should be that non-dragging commands are always bound to
clicks (including double and triple ones) and never to a down- event.
The menu bar might be an exception (Firefox even pops up an entry when
the mouse just hovers over it) but the various (non-)toolkits Emacs
uses for it apparently defeat a common unified behavior anway.

And personally, I'd reserve C-drag-mouse for marking arbitrary
non-contiguous text (like, for example, Firefox does) and use
C-S-drag-mouse for marking rectangular regions.

martin





This bug report was last modified 5 years and 85 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.