Subject: Re: bug#61514: 30.0.50; sadistically long xml line hangs emacs

From: Eli Zaretskii <[email-masked]>
Date: Mon, 20 Feb 2023 14:31:07 +0200

> Date: Sun, 19 Feb 2023 23:58:41 +0000
> From: Gregory Heytings <[email-masked]>
> cc: [email-masked], [email-masked], 
>     Stefan Monnier <[email-masked]>
> 
> BTW, this makes me wonder why emacs_re_max_failures is not accessible from 
> Elisp.  I think it would be very useful, if only for debugging purposes. 
> And perhaps let-binding it to a lower value around some potentially (or 
> actually) problematic regexps would be a good way to prevent or fix bugs 
> such as the current one.

If we know which regexps cause problems, shouldn't we instead fix
those regexps, or change how we use them?

For debugging purposes, you can set the value in the debugger after
starting Emacs, or with a breakpoint just before calling the
problematic code.

As you have seen from the history of this value, it's problematic to
calculate, and the meaning of the value is not obvious.  So exposing
this to Lisp would be a rope that's too long to give our users and
programmers.