From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Scrolling jumpy when line-spacing > 0 Date: Fri, 21 Apr 2017 21:56:45 +0300 Message-ID: <838tmta8sy.fsf@gnu.org> References: <83inlxako6.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1492801008 1636 195.159.176.226 (21 Apr 2017 18:56:48 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 21 Apr 2017 18:56:48 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Apr 21 20:56:44 2017 Return-path: Envelope-to: geh-help-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 1d1djX-0000GH-96 for geh-help-gnu-emacs@m.gmane.org; Fri, 21 Apr 2017 20:56:43 +0200 Original-Received: from localhost ([::1]:32789 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d1djZ-0002HQ-NR for geh-help-gnu-emacs@m.gmane.org; Fri, 21 Apr 2017 14:56:45 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45129) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d1diw-0002Gk-1G for help-gnu-emacs@gnu.org; Fri, 21 Apr 2017 14:56:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d1dis-0005Ly-UP for help-gnu-emacs@gnu.org; Fri, 21 Apr 2017 14:56:06 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39422) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d1dis-0005Lt-Kz for help-gnu-emacs@gnu.org; Fri, 21 Apr 2017 14:56:02 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2400 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1d1dir-0004Ws-Vy for help-gnu-emacs@gnu.org; Fri, 21 Apr 2017 14:56:02 -0400 In-reply-to: (message from Yuri Khan on Sat, 22 Apr 2017 00:58:08 +0700) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:112846 Archived-At: > From: Yuri Khan > Date: Sat, 22 Apr 2017 00:58:08 +0700 > Cc: "help-gnu-emacs@gnu.org" > > On Fri, Apr 21, 2017 at 9:40 PM, Eli Zaretskii wrote: > > > (Why do people report bugs here, rather than with report-emacs-bug?) > > To check if that is indeed a bug worth reporting, or if it is already > known, or even already fixed? All of these are good enough reasons to post to the bug tracker. The chances that people who subscribe to the bug list will quickly point you to the solution or a similar bug report, if they exist, are way higher than hearing that here. > > On the master branch, when you click on the bottom line of > > the window, which is only partially visible in the above scenario, > > Emacs scrolls the window half-window up. To be able to put point on > > the bottom line, you will need to set window-resize-pixelwise non-nil, > > and drag the mode line down pixel by pixel until Emacs lets you put > > point there. > > Which point is that? When the whole additional spacing is visible? Yes. > As a user, I’d expect that additional spacing does not count toward > whether the line is considered visible. The Emacs display engine was designed to avoid having point in a partially visible line, for whatever reasons. The code which checks for partial visibility doesn't care what is in the invisible part, because checking for that would take non-trivial processing, and the subtlety isn't important enough to slow down redisplay. > > Doesn't pos-visible-in-window-p allow you to compute this more > > elegantly, without moving point at all? > > I was in the middle of a $DAYJOB task, and reached for the quickest fix. > > But no, not really. On the contrary, I am compelled to add more > kludges^W idiosyncratic code. Actually, I understand the answer is YES for the purpose for which you wrote the code on which I commented, except that there are additional situations which you need to handle, where yet more code is called for. > The other special case is when the point is in the topmost visible > line. In this case, (scroll-up 1) is forced to move the point into > view. The point is moved to the beginning of the new topmost visible > line, even if it was in the middle of the line initially. Here I want > behavior equivalent to (next-line) followed by (scroll-up), i.e. to > keep column position. > > I see no practical way to detect this condition without moving point. Doesn't posn-at-point allow you to find out whether point is in the topmost window line? (Caveat: this could require special consideration when there's a non-nil header-line-format in the window.)