Subject: bug#70386: closed (Re: bug#70386: 30.0.50; (recenter 0 t) does not put point on top of the window)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 23 May 2024 13:53:02 +0000

Your bug report

#70386: 30.0.50; (recenter 0 t) does not put point on top of the window

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
70386: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=70386
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#70386: 30.0.50; (recenter 0 t) does not put point on top of the window
From: Po Lu <[email-masked]>
To: Eli Zaretskii <[email-masked]>
Cc: [email-masked], [email-masked]
Date: Thu, 23 May 2024 21:52:25 +0800
List-Id: <debbugs-submit.debbugs.gnu.org>

Eli Zaretskii <[email-masked]> writes:

>> Cc: [email-masked]
>> Date: Sun, 19 May 2024 18:29:03 +0300
>> From: Eli Zaretskii <[email-masked]>
>> 
>> > From: Ihor Radchenko <[email-masked]>
>> > Cc: [email-masked], [email-masked]
>> > Date: Sun, 19 May 2024 13:49:02 +0000
>> > 
>> > If I convert my recipe to a defun, there is no problem.
>> > 
>> > I am still seeing weirdness on my side though with Emacs entering a
>> > state when calling M-: (recenter -1 t) does nothing even when the buffer
>> > should be scrolled (point not near the top of buffer). But I am unable
>> > to get a reliable reproducer. Feel free to close this bug report.
>> 
>> If Po Lu thinks this issue is resolved, we can indeed close it.
>
> Ping!

Yes, I agree that this is very much resolved.  Closing.

Subject: 30.0.50; (recenter 0 t) does not put point on top of the window
From: Ihor Radchenko <[email-masked]>
To: [email-masked]
Date: Sun, 14 Apr 2024 16:33:48 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Consider the following reproducer:

1. emacs -Q
2. Insert the following into scratch buffer and put point at "recenter"

(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'

Changing (recenter 0 t) to (recenter 1 t) makes scrolling work as
expected.

This is on the latest master. I started seeing it only today, after
pulling the latest main.

In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.41, cairo version 1.18.0) of 2024-04-14 built on localhost
Repository revision: 99c86454cdd2720dd23393e4ffd94f8d27b784ca
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101011
System Description: Gentoo Linux

Configured using:
 'configure 'CFLAGS= -g3'
 JAVAC=/etc/java-config-2/current-system-vm/bin/javac'

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>