From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#23478: 25.0.93; Mouse region selection asymmetry Date: Sun, 08 May 2016 19:23:17 +0300 Message-ID: <83eg9cecy2.fsf@gnu.org> References: <878tzky2oe.fsf@gmx.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1462724670 31617 80.91.229.3 (8 May 2016 16:24:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 8 May 2016 16:24:30 +0000 (UTC) Cc: 23478@debbugs.gnu.org To: Stephen Berman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun May 08 18:24:18 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1azRV4-0008Kb-9Q for geb-bug-gnu-emacs@m.gmane.org; Sun, 08 May 2016 18:24:10 +0200 Original-Received: from localhost ([::1]:37236 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1azRV3-0003An-Eb for geb-bug-gnu-emacs@m.gmane.org; Sun, 08 May 2016 12:24:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46031) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1azRUz-00037v-EK for bug-gnu-emacs@gnu.org; Sun, 08 May 2016 12:24:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1azRUw-0004CJ-4R for bug-gnu-emacs@gnu.org; Sun, 08 May 2016 12:24:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59285) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1azRUw-0004CF-1B for bug-gnu-emacs@gnu.org; Sun, 08 May 2016 12:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1azRUv-0003f9-Qv for bug-gnu-emacs@gnu.org; Sun, 08 May 2016 12:24:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 08 May 2016 16:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23478 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23478-submit@debbugs.gnu.org id=B23478.146272460914037 (code B ref 23478); Sun, 08 May 2016 16:24:01 +0000 Original-Received: (at 23478) by debbugs.gnu.org; 8 May 2016 16:23:29 +0000 Original-Received: from localhost ([127.0.0.1]:43389 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1azRUP-0003eL-Ji for submit@debbugs.gnu.org; Sun, 08 May 2016 12:23:29 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54900) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1azRUO-0003e9-Co for 23478@debbugs.gnu.org; Sun, 08 May 2016 12:23:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1azRUF-00046V-5i for 23478@debbugs.gnu.org; Sun, 08 May 2016 12:23:23 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:56179) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1azRUF-00046R-2i; Sun, 08 May 2016 12:23:19 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1949 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1azRUD-0001PV-62; Sun, 08 May 2016 12:23:17 -0400 In-reply-to: <878tzky2oe.fsf@gmx.net> (message from Stephen Berman on Sun, 08 May 2016 17:44:49 +0200) 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: 208.118.235.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:117978 Archived-At: > From: Stephen Berman > Date: Sun, 08 May 2016 17:44:49 +0200 > > When you select a region by double-clicking with mouse-1 and the end of > the region is below the last visible line of the window, Emacs recenters > the display, making the entire selected region visible (unless it's > larger than half the window's height). But when you select a region by > double-clicking with mouse-1 and the beginning of the region is above > the first visible line of the window, Emacs does not recenter the > display, so the entire selected region is not visible. Isn't this because Emacs always makes sure point is visible, but there's no such requirement about the mark? If I type "C-x C-x" after item 5 in your recipe, the entire region becomes visible, as expected. > This is not a program bug, since Emacs is behaving as intended, but it > is a UX asymmetry that I think it would be preferable to eliminate. The > patch below does that, but I'm not sure it's the best way to handle > this, since I don't know whether calling `recenter' from Lisp may have > undesirable side effects that the automatic recentering Emacs redisplay > does when point moves out of the visible portion of the window does not > have. I don't think calling 'recenter' is TRT. First, the fact that you see the display recentering after item 3 in your recipe is only the default behavior; if you set scroll-conservatively to 101 before repeating your recipe, you will see that Emacs instead scrolls the display just one line, i.e. the minimum amount required to bring point back into view. Users that set scroll-conservatively like that will lynch us if we recenter display in this situation. Bottom line, I don't think we should behave like that by default. I think this could be an optional feature, but it must obey scroll-conservatively (and maybe also other related variables). Thanks.