Subject: Re: bug#39658: 26.3; can't edit file with terminal escape sequences

From: Eli Zaretskii <[email-masked]>
Date: Thu, 20 Feb 2020 16:46:14 +0200

> From: Mattias Engdegård <[email-masked]>
> Date: Thu, 20 Feb 2020 14:36:17 +0100
> Cc: Robert Pluim <[email-masked]>, [email-masked], [email-masked]
> 
> 19 feb. 2020 kl. 18.47 skrev Eli Zaretskii <[email-masked]>:
> 
> > Ah, yes.  Set bidi-inhibit-bpa non-nil, and Bob's your uncle.
> 
> Fine, so how do we proceed from here? I presume that the bug triggers when the bidi cache limit of 50000 elements is reached (or maybe MAX_BPA_STACK). Turn off BPA temporarily, for the current line or paragraph, when this occurs? Or for the entire buffer, on the grounds that it's hardly right-to-left text anyway?

I think so-long-mode already handles this the best we could do in
general.  I don't know how to solve these pathological cases better,
except advise the user to visit such files literally to begin with.