Subject: Re: bug#54200: 13.0.14; Preview incorrectly folds math environments with TeX-engine LuaTeX

From: David Kastrup <[email-masked]>
Date: Tue, 01 Mar 2022 02:43:45 +0100

Liam Hupfer via bug-auctex via Bug reporting list for AUCTeX
<[email-masked]> writes:

> When I run `preview-buffer` on the attached file, I get a preview that
> looks like "The probability of an initial subsequence of length 3",
> where multiple math environments are folded into the "3" preview. If I
> move the point over the preview, it unfolds and I can see the other
> previews have been generated, but they are not visible due to the
> incorrect folding. Any ideas?
>
> ./_region_.tex:6: Preview: Snippet 1 started.
> <-><->
>
> l.6 ...bility of an initial subsequence of length \(

[...]

> ./_region_.tex:6: Preview: Snippet 3 started.
> <-><->
>
> l.6 ...bility of an initial subsequence of length \(

Maybe you should not run everything into a single large paragraph with
multiple repetitions of very long phrases?

It's conceivable that one could improve on that particular example by
trying to limit context searches to start after the last completed
search in that line.  But that could spell trouble for including the
same file several times.

-- 
David Kastrup