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: Sat, 22 Apr 2017 10:38:24 +0300 Message-ID: <83o9vorixb.fsf@gnu.org> References: <83inlxako6.fsf@gnu.org> <838tmta8sy.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 1492846697 31580 195.159.176.226 (22 Apr 2017 07:38:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 22 Apr 2017 07:38:17 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Apr 22 09:38:11 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 1d1pcP-00082Y-UN for geh-help-gnu-emacs@m.gmane.org; Sat, 22 Apr 2017 09:38:10 +0200 Original-Received: from localhost ([::1]:34580 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d1pcV-0003tK-NC for geh-help-gnu-emacs@m.gmane.org; Sat, 22 Apr 2017 03:38:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51454) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d1pc2-0003sX-Au for help-gnu-emacs@gnu.org; Sat, 22 Apr 2017 03:37:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d1pbx-0006AY-A5 for help-gnu-emacs@gnu.org; Sat, 22 Apr 2017 03:37:46 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47856) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d1pbx-0006AK-6q for help-gnu-emacs@gnu.org; Sat, 22 Apr 2017 03:37:41 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2857 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1d1pbw-0000xZ-AZ for help-gnu-emacs@gnu.org; Sat, 22 Apr 2017 03:37:40 -0400 In-reply-to: (message from Yuri Khan on Sat, 22 Apr 2017 02:30:25 +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:112853 Archived-At: > From: Yuri Khan > Date: Sat, 22 Apr 2017 02:30:25 +0700 > Cc: "help-gnu-emacs@gnu.org" > > >> 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. > > How come Emacs 24 lets me put point in that partially fully visible > line? Was something simplified between 24 and master? Not simplified, fixed. What Emacs 24 and 25 did caused display-related bugs in some cases, and those bugs were fixed in v26. > To me, that kind of subtlety is important. Not that important to cry > regression, but important enough to wonder if I could afford the > slowdown. You could perhaps afford the slowdown, but you (and the rest of us) couldn't afford the bugs. > I’m even mildly bothered by the fact that spacing is conceptually > below its line; I’d find it nicer if half of it was above. Patches to make spacing display like that are welcome. > > 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.) > > Maybe. Maybe not. On the one hand, I do have a non-nil > header-line-format at all times. (For tabbar-mode.) On the other hand, > when I evaluate (posn-at-point) with point in the topmost window line, > I get zero Y and ROW values. It is not immediately clear if I can rely > on that. You can rely on that. Reporting these values reliably is that function's sole purpose, so if it doesn't, it's a bug that should be reported. If all you care about is whether point is in the first screen line of the window, and if you don't need to support too old Emacs versions (where AFAIR there was some inconsistency wrt the first line's coordinates), then the existence of header-line is not an issue for you, and you should have no reason to avoid that function and roll your own, because your own code will have similar subtleties, which posn-at-point is supposed to have solved already. > On the third hand, using motion relative to the point is immediately > clear. What’s the downside? Is it going to be slow? Slow enough to be > noticeable at a key repeat rate of 40 Hz? The main downside is that you might expose the motion to the user under some circumstances, like C-g or some position-related hooks. It is also slower, yes (because posn-at-point is implemented entirely in C and doesn't involve the Lisp interpreter).