GNU bug report logs - #66764
29.1; Emacs scrolls for "(goto-char (point-max))" instead of jumping

Previous Next

Package: emacs;

Reported by: Geza Herman <geza.herman <at> gmail.com>

Date: Thu, 26 Oct 2023 17:06:02 UTC

Severity: normal

Found in version 29.1

Done: Gregory Heytings <gregory <at> heytings.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: geza.herman <at> gmail.com
Cc: Gregory Heytings <gregory <at> heytings.org>, 66764 <at> debbugs.gnu.org
Subject: bug#66764: 29.1; Emacs scrolls for "(goto-char (point-max))" instead of jumping
Date: Fri, 27 Oct 2023 09:50:33 +0300
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.




This bug report was last modified 1 year and 185 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.