Subject: Re: bug#38013: [PATCH] Rectangular region selection with mouse

From: Juri Linkov <[email-masked]>
Date: Wed, 20 Nov 2019 01:07:43 +0200

>> I agree.  We need to use the same keys as in other applications:
>> `C-down-mouse-1' to select the rectangular region, then move
>> its current binding of `mouse-buffer-menu' to the context popup menu
>> bound to `<mouse-3>' like on all other applications.
>
> As I tried to explain before: Other applications use 'C-down-mouse-1'
> for building non-contiguous regions that do _not_ necessarily form a
> rectangle.

Indeed Emacs could use the same 'C-down-mouse-1' to select non-contiguous
regions.  In fact the Emacs rectangular region is a special case of the
non-contiguous region.  So implementing the non-contiguous region selection
would require just writing a pair of short functions.

Regarding a mouse binding for the rectangular region selection,
maybe 'C-M-down-mouse-1' still would be a good choice after all,
while 'C-down-mouse-1' should be reserved for the more general
non-contiguous region selection.

Another variant is not to bind 'C-M-down-mouse-1', but use just
'mouse-1' after the rectangle selection mode is activated by its
current key sequence 'C-x RET'.