From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Scrolling jumpy when line-spacing > 0
Date: Sat, 22 Apr 2017 10:38:24 +0300 [thread overview]
Message-ID: <83o9vorixb.fsf@gnu.org> (raw)
In-Reply-To: <CAP_d_8X2aCXD7yZfbPsjPHhS4Z-y50VtWEu+1utu2mWjFbvLKA@mail.gmail.com> (message from Yuri Khan on Sat, 22 Apr 2017 02:30:25 +0700)
> From: Yuri Khan <yuri.v.khan@gmail.com>
> Date: Sat, 22 Apr 2017 02:30:25 +0700
> Cc: "help-gnu-emacs@gnu.org" <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).
prev parent reply other threads:[~2017-04-22 7:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-21 10:13 Scrolling jumpy when line-spacing > 0 Yuri Khan
2017-04-21 11:03 ` Yuri Khan
2017-04-21 14:44 ` Eli Zaretskii
2017-04-21 14:40 ` Eli Zaretskii
2017-04-21 17:58 ` Yuri Khan
2017-04-21 18:56 ` Eli Zaretskii
2017-04-21 19:30 ` Yuri Khan
2017-04-22 7:38 ` Eli Zaretskii [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83o9vorixb.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.