From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#32848: 26.1; follow-mode cursor move breaks with frame-resize-pixelwise Date: Sat, 29 Sep 2018 13:26:12 +0300 Message-ID: <83sh1s61mj.fsf@gnu.org> References: <8336tv8iv7.fsf@gnu.org> <20180928203151.GB5172@ACM> <838t3l71ow.fsf@gnu.org> <20180929083551.GA4139@ACM> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1538216709 19883 195.159.176.226 (29 Sep 2018 10:25:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 29 Sep 2018 10:25:09 +0000 (UTC) Cc: 32848@debbugs.gnu.org, andlind@gmail.com, darkfeline@felesatra.moe To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Sep 29 12:25:05 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g6CQq-000518-NU for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Sep 2018 12:25:04 +0200 Original-Received: from localhost ([::1]:50274 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6CSx-0006Vt-67 for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Sep 2018 06:27:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45344) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6CSn-0006Vn-OE for bug-gnu-emacs@gnu.org; Sat, 29 Sep 2018 06:27:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g6CSk-0005I7-Jw for bug-gnu-emacs@gnu.org; Sat, 29 Sep 2018 06:27:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54032) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g6CSk-0005I1-GA for bug-gnu-emacs@gnu.org; Sat, 29 Sep 2018 06:27:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g6CSk-0000Tr-BQ for bug-gnu-emacs@gnu.org; Sat, 29 Sep 2018 06:27:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 Sep 2018 10:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32848 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 32848-submit@debbugs.gnu.org id=B32848.15382167981816 (code B ref 32848); Sat, 29 Sep 2018 10:27:02 +0000 Original-Received: (at 32848) by debbugs.gnu.org; 29 Sep 2018 10:26:38 +0000 Original-Received: from localhost ([127.0.0.1]:58290 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g6CSK-0000TC-O2 for submit@debbugs.gnu.org; Sat, 29 Sep 2018 06:26:38 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35584) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g6CSI-0000T0-7G for 32848@debbugs.gnu.org; Sat, 29 Sep 2018 06:26:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g6CS9-00051Z-PU for 32848@debbugs.gnu.org; Sat, 29 Sep 2018 06:26:28 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:46767) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6CS9-00051T-LX; Sat, 29 Sep 2018 06:26:25 -0400 Original-Received: from [176.228.60.248] (port=2155 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1g6CS9-0005fz-86; Sat, 29 Sep 2018 06:26:25 -0400 In-reply-to: <20180929083551.GA4139@ACM> (message from Alan Mackenzie on Sat, 29 Sep 2018 08:35:51 +0000) 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:150753 Archived-At: > Date: Sat, 29 Sep 2018 08:35:51 +0000 > Cc: darkfeline@felesatra.moe, andlind@gmail.com, 32848@debbugs.gnu.org > From: Alan Mackenzie > > > Follow-mode is special in this regard, because with it, showing a > > partial line is not a flaw, as that same line will be fully visible in > > the next window, and follow-mode actually switches to that next > > window. So we need to tell the display engine to behave specially in > > this case. I suggested 2 ways of doing that, the simple one actually > > does what you expected, i.e. the force_start flag will win. > > This feels a bit like a workaround That's because it _is_ a workaround. But it's a safe one, so it can easily go into emacs-26, and solve most of this old bug. More complex solutions will have to go to master and wait till Emacs 27. WDYT about that? > Also, the user can change make-cursor-line-fully-visible at any > time, unlikely though this is. Users can shoot themselves in the foot in many ways, but that's their funerals. We can always tell them "don't do that". > I propose the following solution: at the critical piece of code in > follow mode's post-command-hook, follow mode should check > make-cursor-...-p, and if non-nil, determine, using > pos-visible-in-window-p whether the cursor is in the last partial line. > If so, move it one line higher. In follow-mode, the positions of point > in the non-selected windows are fairly random anyway. Why is this better than what I proposed? I proposed to allow make-cursor-line-fully-visible to have a value that is a function, and let follow-mode define that function accordingly, to make Emacs behave as if the last window in the group had make-cursor-line-fully-visible set to the default or what the user set it, and nil in all other windows under follow-mode. I think that every solution that lets the display engine do the job is cleaner than trying to force the display engine do that same job. Besides, your proposal has the annoying effect of causing a micro-scroll near the end of the window. > As an aside, make-cursor-...-p doesn't appear in either the Emacs manual > or the Elisp manual, and the documentation for set-window-position > doesn't mention it. I can feel a documentation writing urge coming on. We don't document every variable, and this one is unlikely to be modified from the default. So I see no reason for the urge.