From: Eli Zaretskii <eliz@gnu.org>
To: luangruo@yahoo.com
Cc: yantar92@posteo.net, 70386@debbugs.gnu.org
Subject: bug#70386: 30.0.50; (recenter 0 t) does not put point on top of the window
Date: Sat, 27 Apr 2024 11:29:25 +0300 [thread overview]
Message-ID: <86plubw6my.fsf@gnu.org> (raw)
In-Reply-To: <86wmoyk3m4.fsf@gnu.org> (message from Eli Zaretskii on Mon, 15 Apr 2024 19:11:31 +0300)
Ping! Po Lu, could you please look into this issue?
> Cc: 70386@debbugs.gnu.org
> Date: Mon, 15 Apr 2024 19:11:31 +0300
> From: Eli Zaretskii <eliz@gnu.org>
>
> > From: Ihor Radchenko <yantar92@posteo.net>
> > Cc: 70386@debbugs.gnu.org
> > Date: Sun, 14 Apr 2024 19:36:04 +0000
> >
> > Eli Zaretskii <eliz@gnu.org> writes:
> >
> > >> 1. emacs -Q
> > >> 2. Insert the following into scratch buffer and put point at "recenter"
> > >
> > > Which "recenter": the one in the comment or the one in (recenter 0 t) ?
> >
> > The "(recenter 0 t))" line.
> >
> > >> (progn
> > >> (require 'pixel-scroll)
> > >> (pixel-scroll-precision-interpolate
> > >> (* -1 (line-pixel-height)
> > >> (max 0 (- (count-screen-lines (window-start) (point)) 2)))
> > >> nil 1)
> > >> ;; Call original recenter for final adjustment.
> > >> (recenter 0 t))
> > >>
> > >> 3. M-x eval-buffer
> > >> 4. Observe that scroll is not set to line 0, despite calling `recenter'
> > >
> > > I don't think I understand what you mean by "scroll is not set to line
> > > 0". Please explain in more detail what you expected to happen (and
> > > why), and what did happen.
> >
> > Expected is as per docstring:
> >
> > With a numeric prefix argument ARG, recenter putting point on screen line ARG
> > relative to the selected window.
> >
> > So, I expect that (recenter 0 t) will put the line at point on top of
> > the window and that (recenter 1 t) will put the line at point at the
> > second top line.
> >
> > My expectation is met when I simply do emacs -Q M-: (recenter 0 t) or
> > emacs -Q M-: (recenter 1 t) on master.
> >
> > Observed:
> >
> > 1. Line at point slowly scrolls up until it reaches top of the window
> > (`pixel-scroll-precision-interpolate' call)
> >
> > 2. Line at point is reset back to its initial scroll position
> > (`recenter' call)
>
> What is the "initial scroll position" in this case?
>
> > Sometimes, I also observe line at point moving beyond the screen.
>
> It's inconsistent in my testing: sometimes works as I'd expect, and
> sometimes ends up with window's vscroll that is very small: about 1
> screen line.
>
> Po Lu, could you please look into this? Something in
> pixel-scroll-precision-interpolate is randomly misbehaving, at least
> on my system. Since all of this stuff is extremely fragile, it's
> possible that one of the recent changes in xdisp.c broke it somehow.
> But the behavior is not consistent, so I wonder what could cause that.
>
>
>
>
next prev parent reply other threads:[~2024-04-27 8:29 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-14 16:33 bug#70386: 30.0.50; (recenter 0 t) does not put point on top of the window Ihor Radchenko
2024-04-14 19:00 ` Eli Zaretskii
2024-04-14 19:36 ` Ihor Radchenko
2024-04-15 16:11 ` Eli Zaretskii
2024-04-15 17:13 ` Ihor Radchenko
2024-04-15 18:29 ` Eli Zaretskii
[not found] ` <87cyqq5usj.fsf@localhost>
2024-04-15 19:14 ` Eli Zaretskii
2024-04-27 8:29 ` Eli Zaretskii [this message]
2024-04-27 10:56 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-27 11:51 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-29 18:31 ` Ihor Radchenko
2024-05-09 7:37 ` Eli Zaretskii
2024-05-09 7:54 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86plubw6my.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=70386@debbugs.gnu.org \
--cc=luangruo@yahoo.com \
--cc=yantar92@posteo.net \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).