From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.bugs Subject: bug#70386: 30.0.50; (recenter 0 t) does not put point on top of the window Date: Sat, 11 May 2024 19:09:34 +0000 Message-ID: <87h6f4tbbl.fsf@localhost> References: <87v84jrjir.fsf@localhost> <864jc3n510.fsf@gnu.org> <87plurrb2z.fsf@localhost> <86wmoyk3m4.fsf@gnu.org> <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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11247"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, 70386@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 11 21:09:45 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 1s5s6K-0002fT-R9 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 11 May 2024 21:09:44 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s5s5i-0004Dp-C2; Sat, 11 May 2024 15:09:06 -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 1s5s5f-0004DG-RT for bug-gnu-emacs@gnu.org; Sat, 11 May 2024 15:09:04 -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 1s5s5f-0004Gn-3V for bug-gnu-emacs@gnu.org; Sat, 11 May 2024 15:09:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s5s5e-00059S-4g for bug-gnu-emacs@gnu.org; Sat, 11 May 2024 15:09:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 11 May 2024 19:09:02 +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.171545449419794 (code B ref 70386); Sat, 11 May 2024 19:09:02 +0000 Original-Received: (at 70386) by debbugs.gnu.org; 11 May 2024 19:08:14 +0000 Original-Received: from localhost ([127.0.0.1]:50040 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s5s4s-00059C-93 for submit@debbugs.gnu.org; Sat, 11 May 2024 15:08:14 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:58689) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s5s4q-000596-C8 for 70386@debbugs.gnu.org; Sat, 11 May 2024 15:08:13 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 17A23240101 for <70386@debbugs.gnu.org>; Sat, 11 May 2024 21:08:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1715454486; bh=2bFpHDeYHwXseOJVxnFzYvB7U5SgzJNGQkU7k+tnst4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=GH2S6uIJVu7+lTbb4Hm2NEOrqeBFMbQnpfyy5w05RqI2mKHGyY/jdgbzZLwvdZjlB iPybaYshCfKN1Spi14qsbFuNsvW4/9H3SI8mSvdv/mlAbl/vourgvk5VbZciBkuL04 LurQZfYkOwrRaibUpMaD7m9vNLI2i/cMeus0clyQ3l1EoRpJDEiHClI9YtR/3Tdntk 45VFyyb21XH94imL6uQCENVtdtwJZO7u4FZX3NqdL4y0GdM3D1uRURKrEgYz+yn5uk BweG6n49UdBTFkplXPxw84RUdSPp/XUvBWRWVk6a/MJu1ojMh2QSmo9R8P8S62aAsm uXpNEjn2FZ8YA== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4VcFdK22l3z9rxF; Sat, 11 May 2024 21:08:05 +0200 (CEST) In-Reply-To: <86fruo18pg.fsf@gnu.org> 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:284888 Archived-At: Eli Zaretskii writes: >> In my specific reproducer the point is not moved, AFAIK. > > Of course it can move: as the window is scrolled by > pixel-scroll-precision-interpolate, point can become invisible. If > redisplay kicks in, it will move point to bring it back into the > viewport. But it is not what happens in the recording! The point remains at the same line. Or do you mean that the point is somehow moved around during the progn execution? But it does not look like it is the case - when I try (setq point-list nil) (setq current-line-list nil) (progn (push (point) point-list) (push (count-lines 1 (point)) current-line-list) (require 'pixel-scroll) (push (point) point-list) (push (count-lines 1 (point)) current-line-list) (pixel-scroll-precision-interpolate (* -1 (line-pixel-height) (max 0 (- (count-screen-lines (window-start) (point)) 2))) nil 1) (push (point) point-list) (push (count-lines 1 (point)) current-line-list) ;; Call original recenter for final adjustment. (recenter 0 t) (push (point) point-list) (push (count-lines 1 (point)) current-line-list)) point-list ; -> 757 757 757 757 current-line-list ; -> 21 21 21 21 I still do not see "recenter putting point on screen line 0" (quote from `recenter' docstring) after finishing progn and all the elements of `point-list' are the same positions. > ... > That the behavior changed recently doesn't yet mean the previous > behavior was correct and the new one is wrong. It might mean your > code is based on incorrect assumptions, and just happened to work > previously by sheer luck. Maybe. But I do believe that my reproducer demonstrates a bug. I do not want to argue about my original code and want to focus on the reproducer herein instead. I only mentioned this detail for some context. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at