GNU bug report logs - #70386
30.0.50; (recenter 0 t) does not put point on top of the window

Previous Next

Package: emacs;

Reported by: Ihor Radchenko <yantar92 <at> posteo.net>

Date: Sun, 14 Apr 2024 16:34:02 UTC

Severity: normal

Found in version 30.0.50

Done: Po Lu <luangruo <at> yahoo.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Po Lu <luangruo <at> yahoo.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#70386: closed (30.0.50; (recenter 0 t) does not put point on
 top of the window)
Date: Thu, 23 May 2024 13:53:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Thu, 23 May 2024 21:52:25 +0800
with message-id <878r00d49y.fsf <at> yahoo.com>
and subject line Re: bug#70386: 30.0.50; (recenter 0 t) does not put point on top of the window
has caused the debbugs.gnu.org bug report #70386,
regarding 30.0.50; (recenter 0 t) does not put point on top of the window
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
70386: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=70386
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Ihor Radchenko <yantar92 <at> posteo.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.50; (recenter 0 t) does not put point on top of the window
Date: Sun, 14 Apr 2024 16:33:48 +0000
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>


[Message part 3 (message/rfc822, inline)]
From: Po Lu <luangruo <at> yahoo.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: yantar92 <at> posteo.net, 70386-done <at> debbugs.gnu.org
Subject: Re: bug#70386: 30.0.50; (recenter 0 t) does not put point on top of
 the window
Date: Thu, 23 May 2024 21:52:25 +0800
Eli Zaretskii <eliz <at> gnu.org> writes:

>> Cc: 70386 <at> debbugs.gnu.org
>> Date: Sun, 19 May 2024 18:29:03 +0300
>> From: Eli Zaretskii <eliz <at> gnu.org>
>> 
>> > From: Ihor Radchenko <yantar92 <at> posteo.net>
>> > Cc: luangruo <at> yahoo.com, 70386 <at> debbugs.gnu.org
>> > 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.


This bug report was last modified 1 year and 53 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.