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: Sat, 18 Nov 2023 11:01:48 +0200
Message-ID: <83zfzbmo3n.fsf@gnu.org>
References: <ddf1fc8b-2e31-4b2e-8da6-845031ac4171@gmail.com>
 <83jzr9fdh0.fsf@gnu.org> <807a1bd5-6477-cc36-088f-efcb782ccb99@gmail.com>
 <83a5s4fwih.fsf@gnu.org> <831qdgftja.fsf@gnu.org> <83cywp6hvm.fsf@gnu.org>
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
	logging-data="34138"; mail-complaints-to="usenet@ciao.gmane.io"
Cc: geza.herman@gmail.com, 66764@debbugs.gnu.org
To: gregory@heytings.org
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 18 10:02:27 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 1r4HDf-0008go-6M
	for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 18 Nov 2023 10:02:27 +0100
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 1r4HDS-00021J-GR; Sat, 18 Nov 2023 04:02:14 -0500
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 1r4HDG-0001yJ-9O
 for bug-gnu-emacs@gnu.org; Sat, 18 Nov 2023 04:02:11 -0500
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 1r4HDF-00014Y-Sr
 for bug-gnu-emacs@gnu.org; Sat, 18 Nov 2023 04:02:02 -0500
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1r4HDG-00074h-8q
 for bug-gnu-emacs@gnu.org; Sat, 18 Nov 2023 04:02:02 -0500
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: Sat, 18 Nov 2023 09:02:02 +0000
Resent-Message-ID: <handler.66764.B66764.170029812027186@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.170029812027186
 (code B ref 66764); Sat, 18 Nov 2023 09:02:02 +0000
Original-Received: (at 66764) by debbugs.gnu.org; 18 Nov 2023 09:02:00 +0000
Original-Received: from localhost ([127.0.0.1]:47792 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1r4HDD-00074P-Rf
 for submit@debbugs.gnu.org; Sat, 18 Nov 2023 04:02:00 -0500
Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39556)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@gnu.org>) id 1r4HDC-00074D-H1
 for 66764@debbugs.gnu.org; Sat, 18 Nov 2023 04:01:59 -0500
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 1r4HD6-0000mJ-F9; Sat, 18 Nov 2023 04:01:52 -0500
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=nMAfuYpUn+5SbmWi+sge9kDz++sios6LFJU2zgEIt6M=; b=MVWZ0FN1dYxg
 f2u++MgnNIDMIQHb2QeyjFl0z7YSr3gYdtayl+zM4Vf4NxNCNXRviKqrThycG5Kzy+xSiNBasqTfo
 +wbIvuSb0V0avsyOw4PZXxUX8zS9Bo657pqo+NG7e0yJDaOuFFwPTm4eyokxj+iTRcn5jcYS3H+Xe
 uyrZ/0yRGNefO32cqhijNYGrK3XoCX5akzRCkk/xN9YCyRHdNm11g27yNAp1cjcT3Yb+6AKrkjA4T
 STm9kLR+31bd1FJ8I6tiuea1+Ul2IGYrU+pzlhzjQeyh/YXWOJGh1WI9phsDeNTihUQlYVh+RMnSn
 i/xTevAIPe8f7UIcJJN3MQ==;
In-Reply-To: <83cywp6hvm.fsf@gnu.org> (message from Eli Zaretskii on Sat, 04
 Nov 2023 10:29:49 +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:274538
Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/274538>

Ping! Ping!  Gregory, are you there?

> Cc: 66764@debbugs.gnu.org, geza.herman@gmail.com
> Date: Sat, 04 Nov 2023 10:29:49 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> 
> Ping!  Gregory, could you please look into this?
> 
> > Cc: Gregory Heytings <gregory@heytings.org>, 66764@debbugs.gnu.org
> > Date: Fri, 27 Oct 2023 09:50:33 +0300
> > From: Eli Zaretskii <eliz@gnu.org>
> > 
> > OK, I think I see the root cause of the problem: it's your
> > font-lock-keywords setting, viz.:
> > 
> >  (font-lock-add-keywords nil '(((lambda (bound)) (1 'error prepend t))) t)
> > 
> > Without this setting, everything works as expected, and goto-char goes
> > to the EOB almost instantaneously, even when scroll-conservatively is
> > set to a large value.
> > 
> > AFAIU, the font-lock-keywords setting above causes the display engine
> > to call this function every time it moves across some chunk of text,
> > which slows down redisplay.  This shows with scroll-conservatively set
> > to a large value because Emacs then attempts to find the minimum
> > amount of scrolling the screen in order to bring point into the view.
> > 
> > It is a known fact that modes which use advanced font-lock settings
> > should adapt to the long-line situation (when the function
> > long-line-optimizations-p returns non-nil), so I think you should
> > modify your font-lock settings to avoid this problem in that case.
> > 
> > CC'ing Gregory in case I missed something in this scenario.
> > 
> > 
> > 
> > 
> 
> 
> 
>