Subject: Re: bug#70455: [PATCH] Add new user option `preview-leave-open-previews-visible'

From: Paul Nelson <[email-masked]>
Date: Mon, 22 Apr 2024 15:11:55 +0200

Hi Ikumi,

> >> - When you enter a preview, it remains visible.  The tex code appears
> >> below the preview.
>
> The TeX code appears _to right of_ the preview for inline math
> expression for me. Is this a misbehavior? Or does your above sentence
> miss this case?

You're right, for inlined math, it appears to the right (and for
displayed math, it's like in my summary).  This is the intended
behavior, the idea being that someone watching your screen (in person
or remotely) can stay focused on the equation.

>
> I don't understand the change as a whole, but it seems that this change
> extends cases which doesn't touch the preview images through EXCEPTION
> argument of `preview-clearout' function. Doesn't this lead to leave some
> kind of "debris" which needs additional clean-up facility after usage of
> preview-latex?
>

I think there is no such debris, and have attempted to check this, but
would be happy to learn that I missed something.  The EXCEPTION
argument is used only in preview-place-preview, where it is the
overlay being generated -- not something we want to clearout.  The
changes to preview-place-preview have the effect of keeping the old
overlays around long enough for the call to preview-gs-place (via
preview-call-hook) to be able to use the image from the old overlay in
place of the construction symbol, eliminating the flicker that would
otherwise occur when regenerating a preview.  The subsequent call to
preview-clearout should in fact delete that old image, but it stays in
the cache long enough to serve its fleeting purpose.  Happy to discuss
further if that'd clarify.

Thanks, best,

Paul