all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Scrolling jumpy when line-spacing > 0
Date: Fri, 21 Apr 2017 21:56:45 +0300	[thread overview]
Message-ID: <838tmta8sy.fsf@gnu.org> (raw)
In-Reply-To: <CAP_d_8UGSX1fDVSwxFeRj6NkrYwrxt5rtjUK=AxXXQ1yZAwoDw@mail.gmail.com> (message from Yuri Khan on Sat, 22 Apr 2017 00:58:08 +0700)

> From: Yuri Khan <yuri.v.khan@gmail.com>
> Date: Sat, 22 Apr 2017 00:58:08 +0700
> Cc: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
> 
> On Fri, Apr 21, 2017 at 9:40 PM, Eli Zaretskii <eliz@gnu.org> 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.)



  reply	other threads:[~2017-04-21 18:56 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 [this message]
2017-04-21 19:30       ` Yuri Khan
2017-04-22  7:38         ` Eli Zaretskii

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=838tmta8sy.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.