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: Sun, 14 Apr 2024 19:36:04 +0000 Message-ID: <87plurrb2z.fsf@localhost> References: <87v84jrjir.fsf@localhost> <864jc3n510.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="29228"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70386@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Apr 14 21:36:10 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 1rw5e5-0007Ro-09 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 14 Apr 2024 21:36:09 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rw5dq-0008Bm-Ol; Sun, 14 Apr 2024 15:35:54 -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 1rw5do-0008BL-Oy for bug-gnu-emacs@gnu.org; Sun, 14 Apr 2024 15:35:52 -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 1rw5do-0001DH-Gp for bug-gnu-emacs@gnu.org; Sun, 14 Apr 2024 15:35:52 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rw5dz-0006Wp-JY for bug-gnu-emacs@gnu.org; Sun, 14 Apr 2024 15:36:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Apr 2024 19:36:03 +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.171312335024989 (code B ref 70386); Sun, 14 Apr 2024 19:36:03 +0000 Original-Received: (at 70386) by debbugs.gnu.org; 14 Apr 2024 19:35:50 +0000 Original-Received: from localhost ([127.0.0.1]:36190 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rw5dm-0006Uz-16 for submit@debbugs.gnu.org; Sun, 14 Apr 2024 15:35:50 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:57465) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rw5dj-0006UC-TC for 70386@debbugs.gnu.org; Sun, 14 Apr 2024 15:35:48 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 64BEB240103 for <70386@debbugs.gnu.org>; Sun, 14 Apr 2024 21:35:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1713123330; bh=V5uCq3vSgBC7nFGRDjVQi3xdYCZcHgCYw7dOLJBUyHQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=lclbHcaYN/5zq8UleyFcdXQA4uIWVC6LuG8KEnMjsn9bygdkPp7BbqtauvjReomId d0zthRVtdrd8CNC2WfFntZ5SkqlKdN4z59notJyCKwAvwS4HG3KGwH0/7VnT9RvA2C qwUhACk1Rh9SX5nmJpwo+Lkt2VK8OaJbFFkjNZ+rwroJ03F8Xpf0HYd/G6hRFj4+fh Blfj7Nc6EVRMv6T+gpd4Y8relspQNAiFgopx2dBRLX0FIyocmQ4NKE++yIPfCkxjlK mif72L90t9j1z7gx+HAK5+qic+QCHiKbUDE9STrw+QLqO2ZtpS/rki/BNxmD/ztLrO S8flhY1/OwXRw== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4VHgWP5lZgz9rxG; Sun, 14 Apr 2024 21:35:29 +0200 (CEST) In-Reply-To: <864jc3n510.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:283314 Archived-At: Eli Zaretskii writes: >> 1. emacs -Q >> 2. Insert the following into scratch buffer and put point at "recenter" > > Which "recenter": the one in the comment or the one in (recenter 0 t) ? The "(recenter 0 t))" line. >> (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' > > I don't think I understand what you mean by "scroll is not set to line > 0". Please explain in more detail what you expected to happen (and > why), and what did happen. Expected is as per docstring: With a numeric prefix argument ARG, recenter putting point on screen line ARG relative to the selected window. So, I expect that (recenter 0 t) will put the line at point on top of the window and that (recenter 1 t) will put the line at point at the second top line. My expectation is met when I simply do emacs -Q M-: (recenter 0 t) or emacs -Q M-: (recenter 1 t) on master. Observed: 1. Line at point slowly scrolls up until it reaches top of the window (`pixel-scroll-precision-interpolate' call) 2. Line at point is reset back to its initial scroll position (`recenter' call) Sometimes, I also observe line at point moving beyond the screen. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at