On 02/11/2025, Paul D. Nelson wrote:
> The main effect of preview-leave-open-previews-visible isn't tied to
> whether the tex source has been modified, but is rather that when point
> enters a preview overlay, the preview remains visible instead of
> collapsing to the construction symbol.

Hmmm... I am not sure what I am missing. On my setup, the construction
symbol only appears when the source is modified.  If I open the preview
by having the cursor "go into" the preview image, then navigate away
from the source, the preview is collapsed again if I don't modify the
source.

The documentation is also unclear, because the first part of
`preview-leave-open-previews-visible` leans toward what you say:

--8<---------------cut here---------------start------------->8---
Whether to leave previews visible when they are opened.

If nil, then the TeX preview icon is used when the preview is opened.
If non-nil, then the preview image remains visible.  In either case, the
TeX code appears either below or to the right of the displayed graphic.
--8<---------------cut here---------------end--------------->8---

but then the next part is what I am seeing:

--8<---------------cut here---------------start------------->8---
If you enable this option, the preview image doesn't turn into
construction sign temporarily when you edit the underlying LaTeX code
and regenerate the preview; it is just replaced by updated image when
ready.  This behavior suppresses flicker in the appearance.
--8<---------------cut here---------------end--------------->8---

> Let me restate the proposal using your terminology and proposed setting
> 'preview-display-style' (for which the 'both option is not what I had in
> mind, but could also be considered).  Two independent knobs:
>
> - preview-display-style ('preview, 'src): controls what's shown for
>   previews away from point, that the cursor is *not* inside.
>
> - preview-reveal-display ('none, 'after, 'before, 'buframe).  What to
>   show when point enters a previewed region (i.e., the overlay or the
>   underlying tex source):
>
>   - 'none means just show the tex source and the construction sign
>
>   - 'before means show the preview before the tex source while editing
>
>   - 'after means show the preview after the tex source while editing
>
>   - 'buframe means to show the preview in a buframe while editing
>

OK, this makes it clearer somewhat. Though see above regarding how
modification of the TeX source changes behaviour (at least in my
setup). You also mention "while editing", so what happens when not
editing?

Also, the placement of the construction sign can be before or after the
source, just like the preview (in fact that's what preview-point does as
well when preview-leave-open-previews-visible is nil).

> Let's translate current behaviors to the above setup:
>
> Traditional preview with preview-leave-open-previews-visible nil:
>
> (setopt preview-display-style 'preview)
> (setopt preview-reveal-display 'none)

I am gonna assume you mean that while editing or during the generation
of the preview the construction sign appears (before or after?). What
happens when the preview is ready?

> One benefit of separating these concerns is that we could keep
> traditional preview behavior away from point while using a buframe for
> live editing of tex source:
>
> (setopt preview-display-style 'preview)
> (setopt preview-reveal-display 'buframe)
This is what I was trying to say. I think using a buframe for source
editing is not really tenable and would be too difficult to get
right.

Overall, I am of the opinion that (modulo some forward-thinking
introduction of the options) we do not over-complicate the current
implementation at this point by introducing more modes of operation.

Best regards,
-- Al



_______________________________________________
bug-auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-auctex

Reply via email to