Subject: Re: bug#76186: 31.0.50; (recenter 0) sometimes does not recenter as expected

From: Eli Zaretskii <[email-masked]>
Date: Thu, 13 Feb 2025 08:23:16 +0200

> From: Markus Triska <[email-masked]>
> Cc: [email-masked]
> Date: Wed, 12 Feb 2025 22:09:50 +0100
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > Or maybe you could just post the real-life scenario where this
> > happened to you.  Or did that also happen when you invoke recenter in
> > a loop?
> 
> Yes of course: The real-life scenario where I noticed this problem is a
> situation where I use (recenter 0) in an Elisp application, with the
> expectation that it - as documented - recenters point at the topmost
> line of the window. The application works well, and recentering
> generally works as expected. However, I noticed that sometimes (rarely),
> it does not work, even in situations where at other times it works as
> expected.

What is special or noteworthy about the cases where it doesn't work as
expected?  Is the frame or the window of some special (e.g., small)
dimensions? or is the font used to display characters something
special? or are the lines long? or are lines truncated? or is the
expected window-start point in some special place, or inside a text
property or overlay? anything else that is special about those cases?