Subject: bug#56393: Auto narrowing autside of redisplay

From: Gerd Möllmann <[email-masked]>
Date: Tue, 19 Jul 2022 11:17:36 +0200

Gregory Heytings <[email-masked]> writes:

> If a buffer with long lines is never or not yet displayed, the
> specific optimizations do not take place.  That was a very important
> if not critical improvement, because Emacs may internally use buffers
> with long lines, and they should be entirely unaffected by that
> change.  (For example, the newsrc.eld file used internally by Gnus
> contains one such long line; if the same temporary restrictions were
> used in that buffer, it is possible that Gnus would not work correctly
> anymore.)
>
> As far as I can tell, iterators are used in such buffers, too, but
> they are not fontified.  Fontification happens only when necessary,
> that is, when the buffer is actually displayed.

Okay, I understand the internal buffer argument.  But what if it is not
such a buffer?  Say a large XML or JS file with background
fontification.

WDYT about marking buffers that don't want auto narrowing?  Or
the opssite, mark buffers that want it?