From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs 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 Message-ID: <86y18fz689.fsf@gnu.org> References: <87v84jrjir.fsf@localhost> <86plubw6my.fsf@gnu.org> <87edarf50m.fsf@yahoo.com> <87a5lff2h1.fsf@yahoo.com> <87jzkgaumg.fsf@localhost> <86pltv77w2.fsf@gnu.org> <87a5kz2ze7.fsf@yahoo.com> <87seyotf2v.fsf@localhost> <86msow1bdb.fsf@gnu.org> <87pltsteiu.fsf@localhost> <86le4g19ya.fsf@gnu.org> <87jzk0tcl9.fsf@localhost> <86fruo18pg.fsf@gnu.org> <87h6f4tbbl.fsf@localhost> <86eda71sdx.fsf@gnu.org> <87eda7tuya.fsf@localhost> <86a5kv1qlc.fsf@gnu.org> <87a5kvtt2f.fsf@localhost> <868r0f1pjr.fsf@gnu.org> <875xvjts6u.fsf@localhost> <864jb31jap.fsf@gnu.org> <87y18fs7sq.fsf@localhost> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25712"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, 70386@debbugs.gnu.org To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 12 12:16:25 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s66Fl-0006Sl-9j for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 12 May 2024 12:16:25 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s66FR-0003CV-9W; Sun, 12 May 2024 06:16:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s66FO-0003Af-IW for bug-gnu-emacs@gnu.org; Sun, 12 May 2024 06:16:03 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s66FO-0006kZ-AG for bug-gnu-emacs@gnu.org; Sun, 12 May 2024 06:16:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s66FN-0000h5-Ns for bug-gnu-emacs@gnu.org; Sun, 12 May 2024 06:16:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 12 May 2024 10:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70386 X-GNU-PR-Package: emacs Original-Received: via spool by 70386-submit@debbugs.gnu.org id=B70386.17155089302649 (code B ref 70386); Sun, 12 May 2024 10:16:01 +0000 Original-Received: (at 70386) by debbugs.gnu.org; 12 May 2024 10:15:30 +0000 Original-Received: from localhost ([127.0.0.1]:53651 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s66Es-0000gf-0l for submit@debbugs.gnu.org; Sun, 12 May 2024 06:15:30 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:47486) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s66Eo-0000gV-Ro for 70386@debbugs.gnu.org; Sun, 12 May 2024 06:15:28 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s66Ej-0006hK-3Z; Sun, 12 May 2024 06:15:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=063x/lZgJS2xvlEZACsJGbRjcbMSkT5EVU+UWb2+goU=; b=aC3pgWO2fHgT 5sgIGuZLewZ68Ii2m0F0p355UxYUkMQThKFNsQoudv/wm6qt2uv8oGgecmFcm2bDo/PYTSuqx57GC gE0V0UNBkfgxwuXPcPoVHoHebZqRJp18FxIOSs49+F2QourVahWW65U5oj8a3IzyB9GOL9pmqCH+O bob6TqzIYGcahx6pIoaBS+zYIBlhlbFQ8b0Dug4RdE8QtAXVdT7AEVMiZXfxwPtwm00LGMZteBBWN P20YMqQscV54VZEe0qfxtDh0iPHSiun8CCcVir9+mwClrq/Ob1LF/dW+OLvikiGW72+IDKbf13SLr Lb77XX3FO7S2vbXqWMsWIQ==; In-Reply-To: <87y18fs7sq.fsf@localhost> (message from Ihor Radchenko on Sun, 12 May 2024 09:23:17 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:284911 Archived-At: > From: Ihor Radchenko > Cc: luangruo@yahoo.com, 70386@debbugs.gnu.org > Date: Sun, 12 May 2024 09:23:17 +0000 > > Eli Zaretskii 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?