From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: Eli Zaretskii <eliz@gnu.org>
Newsgroups: gmane.emacs.bugs
Subject: bug#66764: 29.1;
 Emacs scrolls for "(goto-char (point-max))" instead of jumping
Date: Thu, 26 Oct 2023 21:25:16 +0300
Message-ID: <83jzr9fdh0.fsf@gnu.org>
References: <ddf1fc8b-2e31-4b2e-8da6-845031ac4171@gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
	logging-data="31444"; mail-complaints-to="usenet@ciao.gmane.io"
Cc: 66764@debbugs.gnu.org
To: Geza Herman <geza.herman@gmail.com>
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 26 20:25:52 2023
Return-path: <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>
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 <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>)
	id 1qw53H-00083N-Qp
	for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 26 Oct 2023 20:25:51 +0200
Original-Received: from localhost ([::1] helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <bug-gnu-emacs-bounces@gnu.org>)
	id 1qw530-00066T-1V; Thu, 26 Oct 2023 14:25:34 -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 <Debian-debbugs@debbugs.gnu.org>)
 id 1qw52y-00064i-Db
 for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2023 14:25:32 -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 <Debian-debbugs@debbugs.gnu.org>)
 id 1qw52x-00021h-V7
 for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2023 14:25:32 -0400
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1qw53S-0007oY-GB
 for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2023 14:26:02 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Eli Zaretskii <eliz@gnu.org>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Thu, 26 Oct 2023 18:26:02 +0000
Resent-Message-ID: <handler.66764.B66764.169834476130031@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 66764
X-GNU-PR-Package: emacs
Original-Received: via spool by 66764-submit@debbugs.gnu.org id=B66764.169834476130031
 (code B ref 66764); Thu, 26 Oct 2023 18:26:02 +0000
Original-Received: (at 66764) by debbugs.gnu.org; 26 Oct 2023 18:26:01 +0000
Original-Received: from localhost ([127.0.0.1]:34453 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1qw53Q-0007oI-SM
 for submit@debbugs.gnu.org; Thu, 26 Oct 2023 14:26:01 -0400
Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45700)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@gnu.org>) id 1qw53N-0007o1-1F
 for 66764@debbugs.gnu.org; Thu, 26 Oct 2023 14:25:59 -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 <eliz@gnu.org>)
 id 1qw52m-0001cU-Nu; Thu, 26 Oct 2023 14:25:20 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=upXkQJ/7XxviK9UXz1axAz8X8EenfhfSH/RYpcEn07w=; b=IBkWwaXAgrtZrCPZiR6+
 XU8eQGfeCFA5bbpvxS22e1Xlh2PpmdbeRXojr0Ukb47aEfFXLOTtYjs4cck6ACv+zz99O3+xMbUcv
 lbNBwaWuXhK3p/mjHD//w39BuUvjomaAzLvKn/CGlfV6rsbzzmNjLAFqpZytH7SYyRljlo5IogM6v
 z+LtjDmRcU3NkPNloa0vADvEYJOao9lD4mj12wOUVyRh0fFjy1GDG1q5cAt6v6FqBXy+H0BlFvG+6
 JmmDxKD5v8OBl6ez0af6e7VcJYRWvjj5dH+eYraZ2YtZNUUXaTqPxhsCWiFCwCA9rQTv3fFRFek7s
 BsypoyBRl7KyCw==;
In-Reply-To: <ddf1fc8b-2e31-4b2e-8da6-845031ac4171@gmail.com> (message from
 Geza Herman on Thu, 26 Oct 2023 19:04:42 +0200)
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" <bug-gnu-emacs.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/bug-gnu-emacs>
List-Post: <mailto:bug-gnu-emacs@gnu.org>
List-Help: <mailto:bug-gnu-emacs-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=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:273309
Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/273309>

> Date: Thu, 26 Oct 2023 19:04:42 +0200
> From: Geza Herman <geza.herman@gmail.com>
> 
> The bug is, that in certain circumstances, emacs moves the point by 
> using some kind of scrolling for "(goto-char (point-max))", instead of 
> just jumping.
> 
> Repro:
> 
> - create a file using the little C program at the end (it produces a 
> large text to stdout, you'll need to redirect it to some file)
> 
> - open the file with "emacs -Q generated.txt"
> 
> - with M-:, execute this:
> 
>     (progn
>       (setq scroll-conservatively 101)
>       (font-lock-add-keywords nil '(((lambda (bound)) (1 'error prepend 
> t))) t)
>       (goto-char (point-max)))
> 
> Notice that emacs doesn't jump to the end immediately as usual, but it 
> does some kind of very fast scrolling.

I didn't yet try to reproduce this, but just reading the description:
why do you consider this behavior a problem, let alone a bug?

> In my real case, a much smaller file produces this problem. Also, Emacs 
> doesn't go to the end of the file, but stops somewhere in the middle (I 
> was unable to reproduce this issue with a simple configuration).

This can legitimately happen if the last line has tall characters or
you use line-spacing or something similar.  Again, why is it a
problem, as long as EOB is visible after that?

> So to go to the end of the file I have to run "(goto-char
> (point-max))" multiple times. Interestingly, "M->" works fine. But
> if I remove the recenter call at the end of "end-of-buffer", it also
> has this odd behavior.

Which isn't surprising, since with the 'recenter' call removed,
end-of-buffer is just (goto-char (point-max)).