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


Message #101 received at 70386 <at> debbugs.gnu.org (full text, mbox):

From: Ihor Radchenko <yantar92 <at> posteo.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: luangruo <at> yahoo.com, 70386 <at> debbugs.gnu.org
Subject: Re: bug#70386: 30.0.50; (recenter 0 t) does not put point on top of
 the window
Date: Sun, 19 May 2024 13:49:02 +0000
Eli Zaretskii <eliz <at> gnu.org> writes:

>> 1. emacs -Q
>> 2. Insert
>> (progn
>>   (require 'pixel-scroll)
>>   (pixel-scroll-precision-interpolate
>>    (* -1 (line-pixel-height)) nil 1)
>>   (recenter 0 t))
>> 3. Move point to "progn"
>> 4. M-x eval-buffer
>
> Still unpredictable.  Sometimes point ends up on progn with
> window-start being 1 as at the beginning, sometimes I see the
> "recenter" line at the top line with point at EOB (i.e. below that
> line).

Ok. I can see what might be going on here - M-x eval-buffer
moves the point before evaluation, causing this weird behavior.

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.

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




This bug report was last modified 362 days ago.

Previous Next


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