unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: luangruo@yahoo.com, 70386@debbugs.gnu.org
Subject: bug#70386: 30.0.50; (recenter 0 t) does not put point on top of the window
Date: Sun, 12 May 2024 13:15:18 +0300	[thread overview]
Message-ID: <86y18fz689.fsf@gnu.org> (raw)
In-Reply-To: <87y18fs7sq.fsf@localhost> (message from Ihor Radchenko on Sun, 12 May 2024 09:23:17 +0000)

> From: Ihor Radchenko <yantar92@posteo.net>
> Cc: luangruo@yahoo.com, 70386@debbugs.gnu.org
> Date: Sun, 12 May 2024 09:23:17 +0000
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> I am mostly concerned about the case when the line _does not_ move to
> >> window's top. The other case is what I observed in the past as well. It
> >> is only the case when nothing is moved between begin/end states that
> >> appeared recently.
> >
> > It never happens that "nothing is moved" here.  What I see is that the
> > window is scrolled as expected, and then scrolled (or recentered?)
> > back.
> 
> That's what I mean by "does not move to window's top". I expect
> recentering to not move things back to the initial state but instead to
> set the point at least close to the top of the window.

Why do you think it's the call to 'recenter' which does it?  Any solid
evidence to confirm that?

Also, are you familiar with how 'recenter' works in Emacs?  The call
to the function doesn't scroll the text, it only asks (gently) that
redisplay does.  And redisplay kicks in when your snippet finished
running, and Emacs is back in its main loop.

On top of that, your snippet calls pixel-scroll-precision-interpolate,
which runs a loop which itself calls redisplay, and which waits for 1
msec between loop iterations (something that on some system is
impossible, and you get either no waiting or a much larger wait
period, like 10 msec).  Should we be surprised that the results are
shaky at best?





  reply	other threads:[~2024-05-12 10:15 UTC|newest]

Thread overview: 35+ 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
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
2024-05-11 17:48                   ` Ihor Radchenko
2024-05-11 17:56                     ` Eli Zaretskii
2024-05-11 18:00                       ` Ihor Radchenko
2024-05-11 18:26                         ` Eli Zaretskii
2024-05-11 18:42                           ` Ihor Radchenko
2024-05-11 18:53                             ` Eli Zaretskii
2024-05-11 19:09                               ` Ihor Radchenko
2024-05-12  6:00                                 ` Eli Zaretskii
2024-05-12  6:17                                   ` Ihor Radchenko
2024-05-12  6:39                                     ` Eli Zaretskii
2024-05-12  6:58                                       ` Ihor Radchenko
2024-05-12  7:02                                         ` Eli Zaretskii
2024-05-12  7:17                                           ` Ihor Radchenko
2024-05-12  9:17                                             ` Eli Zaretskii
2024-05-12  9:23                                               ` Ihor Radchenko
2024-05-12 10:15                                                 ` Eli Zaretskii [this message]
2024-05-12  7:19                                           ` Ihor Radchenko
2024-05-12  9:19                                             ` Eli Zaretskii
2024-05-19 13:49                                               ` Ihor Radchenko
2024-05-19 15:29                                                 ` Eli Zaretskii
2024-05-23 13:27                                                   ` Eli Zaretskii
2024-05-23 13:52                                                     ` 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=86y18fz689.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).