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#26445: 26.0.50; Scroll margin and cursor movement working incorrectly when scrolling over different height lines Date: Fri, 14 Apr 2017 09:50:58 +0300 Message-ID: <83vaq7h48d.fsf@gnu.org> References: <624e8d20-8e9f-f164-d9e8-b81659eec2f7@web.de> <83wpaogkqr.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1492152672 26576 195.159.176.226 (14 Apr 2017 06:51:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 14 Apr 2017 06:51:12 +0000 (UTC) Cc: alexanderm@web.de, 26445@debbugs.gnu.org To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Apr 14 08:51:07 2017 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 1cyv4V-0006oD-4b for geb-bug-gnu-emacs@m.gmane.org; Fri, 14 Apr 2017 08:51:07 +0200 Original-Received: from localhost ([::1]:52095 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cyv4a-0001GD-Uw for geb-bug-gnu-emacs@m.gmane.org; Fri, 14 Apr 2017 02:51:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38819) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cyv4V-0001G8-Am for bug-gnu-emacs@gnu.org; Fri, 14 Apr 2017 02:51:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cyv4Q-0006wI-7w for bug-gnu-emacs@gnu.org; Fri, 14 Apr 2017 02:51:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48169) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cyv4Q-0006w8-4H for bug-gnu-emacs@gnu.org; Fri, 14 Apr 2017 02:51:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cyv4P-0006Yl-R1 for bug-gnu-emacs@gnu.org; Fri, 14 Apr 2017 02:51: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: Fri, 14 Apr 2017 06:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26445 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 26445-submit@debbugs.gnu.org id=B26445.149215264725195 (code B ref 26445); Fri, 14 Apr 2017 06:51:01 +0000 Original-Received: (at 26445) by debbugs.gnu.org; 14 Apr 2017 06:50:47 +0000 Original-Received: from localhost ([127.0.0.1]:46368 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cyv4B-0006YJ-8y for submit@debbugs.gnu.org; Fri, 14 Apr 2017 02:50:47 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:47713) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cyv49-0006Y6-LC for 26445@debbugs.gnu.org; Fri, 14 Apr 2017 02:50:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cyv40-0006o0-BN for 26445@debbugs.gnu.org; Fri, 14 Apr 2017 02:50:40 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43883) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cyv40-0006nv-4V; Fri, 14 Apr 2017 02:50:36 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1657 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cyv3z-0006a5-Bg; Fri, 14 Apr 2017 02:50:35 -0400 In-reply-to: (message from Noam Postavsky on Thu, 13 Apr 2017 16:05:31 -0400) 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:131559 Archived-At: > From: Noam Postavsky > Date: Thu, 13 Apr 2017 16:05:31 -0400 > Cc: Alexander Miller , 26445@debbugs.gnu.org > > >> I think the root issue might be that scroll-margin is given in lines, > >> and then it's translated to pixels under the assumption that lines are > >> all using the default height. > > > > If that's the problem, I see no good solutions here, because > > scroll-conservatively > 100 explicitly requests to position point as > > close to the window edge as possible, and the alternating lines of > > different height in the recipe of this bug report force us to stop one > > line earlier every other scroll. Am I missing something? > > I would have to sketch this out on paper to be sure, but you're probably right. The only solution I see is to use window-vscroll to position point more accurately one line before scroll-margin. That sounds gross to me, though, and will cause a similar "stutter" on the first screen line of the window, so someone else in some other use case will probably complain. If we do want to make such changes, the place to make them is in line-move and line-move-partial, not in xdisp.c. > > When a > > line is taller than the canonical height, positioning point on it > > might enter the scroll-margin, and we still need to back up, don't we? > > IOW, the above code still move "by lines", and will "stutter" if lines > > are intermittently of different height. What possible solution could > > we come up with in such situations? It seems to me that the user gets > > what they asked for. > > Yes, maybe the answer to this bug is just not to set > scroll-conservatively so high then. Or accept the consequences of it being high.