From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#38013: [PATCH] Rectangular region selection with mouse Date: Sat, 23 Nov 2019 16:53:13 +0200 Message-ID: <83y2w6tzja.fsf@gnu.org> 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> <2df02c1f-fea4-f764-eba6-fd67de581755@gmx.at> <3b74a108-28e3-fd01-64a5-7c4302e3d979@gmx.at> <9A9D13F2-1F4F-4DD4-B92F-96FC4D91DFBD@acm.org> <83pni17x5b.fsf@gnu.org> <8B95D2D3-8E00-45BF-B57D-EFD49D79EB6A@acm.org> <83bltk95p7.fsf@gnu.org> <60DD9D65-C3F0-470E-8489-B333E1889D32@acm.org> <83ftio6lsy.fsf@gnu.org> <290E5E66-964B-4E29-B141-166447AD5556@acm.org> <175E5B2E-2256-4FCD-AA8E-9E5BC6DE7907@acm.org> <835zjavm8r.fsf@gnu.org> <61064586-CCB1-4F40-9584-EA618FBB0D6B@acm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="200696"; 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 Sat Nov 23 15:54:13 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 1iYWnc-000q6u-Iv for geb-bug-gnu-emacs@m.gmane.org; Sat, 23 Nov 2019 15:54:12 +0100 Original-Received: from localhost ([::1]:59354 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iYWnb-0005Q0-9M for geb-bug-gnu-emacs@m.gmane.org; Sat, 23 Nov 2019 09:54:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50037) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iYWnU-0005Pr-SB for bug-gnu-emacs@gnu.org; Sat, 23 Nov 2019 09:54:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iYWnT-00073V-TV for bug-gnu-emacs@gnu.org; Sat, 23 Nov 2019 09:54:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47253) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iYWnT-00073M-Qb for bug-gnu-emacs@gnu.org; Sat, 23 Nov 2019 09:54:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iYWnT-0001uL-Kq for bug-gnu-emacs@gnu.org; Sat, 23 Nov 2019 09:54:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Nov 2019 14:54:01 +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.15745208087287 (code B ref 38013); Sat, 23 Nov 2019 14:54:01 +0000 Original-Received: (at 38013) by debbugs.gnu.org; 23 Nov 2019 14:53:28 +0000 Original-Received: from localhost ([127.0.0.1]:56074 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iYWmr-0001tQ-3d for submit@debbugs.gnu.org; Sat, 23 Nov 2019 09:53:27 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:40916) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iYWmn-0001t9-8b for 38013@debbugs.gnu.org; Sat, 23 Nov 2019 09:53:22 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:60571) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iYWmh-00063G-JH; Sat, 23 Nov 2019 09:53:15 -0500 Original-Received: from [176.228.60.248] (port=2910 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iYWmh-0003dY-2p; Sat, 23 Nov 2019 09:53:15 -0500 In-reply-to: <61064586-CCB1-4F40-9584-EA618FBB0D6B@acm.org> (message from Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= on Sat, 23 Nov 2019 13:46:08 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:172310 Archived-At: > From: Mattias EngdegÄrd > Date: Sat, 23 Nov 2019 13:46:08 +0100 > Cc: rudalics@gmx.at, 38013@debbugs.gnu.org > > > I think this variable's name should start with "mouse-". Like > > mouse-fine-grained-movement or something. > > True, but since the variable pertains to the 'mouse-movement' event in particular and not to moving the mouse about in general, it is also useful to have the name reflect that relation. > 'mouse-movement-fine-grained' is possible but a bit awkward. What about 'mouse-fine-grained-tracking'? Fine with me. > The code follows the pattern of other functions in the same file in that it trusts the exit function of the transient map to be executed eventually, and the first thing done in that exit function is to reset the variables. > > All these functions have a small hole between setting the variables and the successful return of set-transient-map, during which an error will not result in the variables being reset. We could wrap the set-transient-map calls in condition-case everywhere, if we think that this would increase robustness. Basically, > > (condition-case err > (set-transient-map ...) > (error (setq fine-grained-mouse-movement nil) > (setq track-mouse nil) > (signal (car err) (cdr err)))) I think this would be better. IME, such small windows eventually cause strange and hard to debug bugs, so any measures to make the window smaller or eliminate it are welcome. Thanks.