From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#38013: [PATCH] Rectangular region selection with mouse Date: Thu, 7 Nov 2019 20:08:55 +0100 Message-ID: <2df02c1f-fea4-f764-eba6-fd67de581755@gmx.at> References: <83lft0m3ug.fsf@gnu.org> <3541E0E8-9E33-4FBD-B0D9-DFF77C241F6F@acm.org> <83y2wzlorw.fsf@gnu.org> <83v9s3lo5f.fsf@gnu.org> <75EC4FBC-F636-4D75-BAC4-982D85188794@acm.org> <9b9222ad-ead7-d0a0-0602-780d0680f070@gmx.at> <6bf229f4-c22f-c3c2-5158-5235f908de3c@gmx.at> <8ec84837-172c-1ce5-cab0-b4c96a86274e@gmx.at> <411EAB4E-B666-4263-8514-5F47391268B1@acm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="134601"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 38013@debbugs.gnu.org To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 07 20:11:10 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iSnBV-000YrM-Fo for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Nov 2019 20:11:09 +0100 Original-Received: from localhost ([::1]:47486 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iSnBT-00033r-Sy for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Nov 2019 14:11:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42609) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iSnAT-00032P-Ir for bug-gnu-emacs@gnu.org; Thu, 07 Nov 2019 14:10:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iSnAR-0006gr-Ku for bug-gnu-emacs@gnu.org; Thu, 07 Nov 2019 14:10:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35104) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iSnAQ-0006gY-V9 for bug-gnu-emacs@gnu.org; Thu, 07 Nov 2019 14:10:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iSnAQ-0006HF-IR for bug-gnu-emacs@gnu.org; Thu, 07 Nov 2019 14:10:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Nov 2019 19:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38013 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 38013-submit@debbugs.gnu.org id=B38013.157315375224053 (code B ref 38013); Thu, 07 Nov 2019 19:10:02 +0000 Original-Received: (at 38013) by debbugs.gnu.org; 7 Nov 2019 19:09:12 +0000 Original-Received: from localhost ([127.0.0.1]:43924 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSn9c-0006Ft-Ht for submit@debbugs.gnu.org; Thu, 07 Nov 2019 14:09:12 -0500 Original-Received: from mout.gmx.net ([212.227.15.15]:49831) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSn9a-0006Fd-4Z for 38013@debbugs.gnu.org; Thu, 07 Nov 2019 14:09:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1573153739; bh=ZDLJkwqjzU2r3+MUqlS/PWH7VdBYWzeMtiN3PBr35rM=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=N9aUVdQ22sfGT8J3J68lkrg/IemcwMPfVIXfYH1TkNMz6GkBfHvmxi0//HZRmEwEL kZHQbicMYUmskb1nLEBq9TyPblBrIHsjcTJIWxpO1zYn6CRbK++NmhGGWpkMDx0tpC r6myvOb+K2P54uptXDUnd6aWQqFoTG0Dcv+oa3+A= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.100] ([212.95.5.189]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MD9T1-1ibpZi0QqX-009CWZ; Thu, 07 Nov 2019 20:08:59 +0100 In-Reply-To: <411EAB4E-B666-4263-8514-5F47391268B1@acm.org> Content-Language: de-AT X-Provags-ID: V03:K1:JDajV6kJdueaFA4LlYsKwqvATwQOchXgtyS3NT2/pTgYknoeE5n iDOnfkUR+czF+sAzoIPMGu1BYFcJG0dw32x32FkU92R0yzAvMZpxX2KeA9V/JHPC5tIu/Nk AYtG7EMzMezNnLyY1kelzhejQ+TEZ+rdOYw4RUyqc3ip+mqesEjX2jJC8epVhzzCNQ05tBr 0+qczRzmXZE9y2HSOUUiQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:RsaQc7Vvk8s=:8p7YBY1a4lIR/w/ZQYCsOE bzPdNegN15v4AE3CZxcAH2vmmZ2PMpF4ca13LFjwRKm37AW62U1c7WPOEgbRaWidLhNQ6z37R 8SHU4Rbui1NOhZOCq+SzDX6ODJvtuVtKEieiw3YGDyCaloIJ33cdBrF/BfAT42vbIEaaEdfQ3 b2XrOaT5sJ2Ptsr4bFfGkIL10BXqJEakSvPuWrq7UDAI8dryKoAxqHglgtxLjBnlDnyxMCgyR 7fyMNjiV7bfqD6/dezYkcv/zxEZ0SqiNBtPvgCoxgpTI77BkwA0B/d3Y6xXaj3zmaoc5DTpri S5l+cW/tn04ifWM7eEk4jh7frhhrOzULwGeXn2NvBt6CpQjDYGKvDWIdDhizoYxOD3cHugU0m 8RSkV2Vh3CgQhvqoUuKnly0Lie1gT4IhdqhtTfF7OxOyIAi2I5mLl5lgO9TNNl3AOYvDx79K+ VR/PBWcwaTNMZiF/sPRF7zZDIzAbf8YlHW2zHiXwt1lDJdAsH4kBMVsLAcSx4ripnN1YpBxSQ YkaS4DVZrMisHJ/AOCSv74Z0/pxA867fbh9bsrMaJESRe/h3VK6d5YGqhqsxskBNVb1klptBn lp2bLEub8P2TChFsy8qVt6d3UqoiLbeCkmaN0qqhXl2OOKotHW155LNJemarxeNwHQOuHLD7f 2iWlsfleyOeZ5AL3jzuSZ3vc3mi6avHLwzXbSoctHmwYVxbAaaYHIeJskKIUAAHhZ4xQe616x psSGdr6bCcjkPvy6Z48NeJXImaUSviecBD4ty2G+p2qUMA8jrmD05mW0tDtkQK5J825Lw+Hp X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:171108 Archived-At: > 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