GNU bug report logs - #57804
An infinite loop in a `fontify-region' function causes Emacs to hang indefinitely

Previous Next

Package: emacs;

Reported by: Paul Pogonyshev <pogonyshev <at> gmail.com>

Date: Wed, 14 Sep 2022 15:07:01 UTC

Severity: normal

Tags: wontfix

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Gregory Heytings <gregory <at> heytings.org>
To: Paul Pogonyshev <pogonyshev <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 57804 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi <at> gnus.org>
Subject: bug#57804: An infinite loop in a `fontify-region' function causes Emacs to hang indefinitely
Date: Thu, 15 Sep 2022 22:16:36 +0000
>
> I don't know why, this is a hypothetical, but fairly realistic 
> situation, right?
>

Discussing hypothetical issues leads nowhere, according to my experience. 
Let's focus on actual issues.

>
> Now, let's say function `logview-do-bla-bla-bla' cannot work with 
> narrowed buffer (half of functions in Logview cannot).
>

You said I'm not allowed to tell you that your code could do things 
differently, but that doesn't mean it isn't true.  It is for example 
possible to parse the buffer outside of fontification-functions and to use 
the result of that parsing inside fontification-functions.  Yet another 
method would be to use a simpler fontification method in buffers with too 
long lines.  Yet another method would be to turn font locking off in 
buffers with too long lines.  Yet another method would be to truncate too 
long lines.  I also cannot understand why it is necessary, in log files in 
which all lines are independent, to move beyond the beginning and end of a 
line to decide how it must be fontified.

> 
> Will I be able to lift locked narrowing restrictions without knowing the 
> tag?
>

This is akin to a security mechanism, there is no reason to make it 
possible to turn it off "too easily".




This bug report was last modified 2 years and 230 days ago.

Previous Next


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