Hello Paul,

On 30/11/2025, Paul D. Nelson wrote:

> A couple minor comments:
>
> - The buframe jumps around a bit while live editing (regardless of other
>   settings).  Could this be reduced somehow?  (Not a big issue, and can
>   be postponed to later patches if it's at all tricky.)

This one is tricky because I am not sure what a better solution would
be. Currently, I use `buframe-position-right-of-overlay` to determine
the position of the buframe which places it to the right, centred
vertically.

As the overlay dimension change (when the TeX source is modified), the
buframe placement changes. This was intentional as I wanted the frame to
move out of the way of the text (so it always gets pushed right). I can
disable vertical re-centring, but the frame would still be moving
around.

> - The comment ';;; preview-point customizations and variables' now seems
>   obsolete (and many things in the section that it demarcates are
>   unrelated to the new functionality).

Noted.

> Rename 'preview-always-show' to 'preview-show-away-from-point', rename
> 'preview-point-where' to 'preview-at-point-placement', and split
> 'preview-leave-open-previews-visible' into 'preview-at-point-display'
> and 'preview-keep-image-during-regeneration', with behavior as follows:

IMO the name `preview-keep-image-during-regeneration` is not accurate
because the images are kept when the preview is disabled or "stale"
(after change) even before generation. Perhaps
`preview-keep-stale-images` is better?

Regarding the other options, the inconsistency for me is that
`preview-at-point-display` is only relevant when
`preview-show-away-from-point` is non-nil. A similar inconsistency is
with `preview-protect-point`, which is relevant only when
`preview-show-away-from-point` is non-nil (in fact it only makes sense
if icons are displayed on point -- if the preview is always displayed
then there's no reason not to "protect point").

If we are open to completely changing the customization interface, how
about we add a new single customization `preview-show-mode` taking one
of four values (to map it to your proposal, let
S=preview-show-away-from-point, D=preview-at-point-display,
P=preview-protect-point):

- 'always: Show preview both at point with the source and away from it
  replacing the source (S=t, D=preview, P=t).
- 'at-point: Show preview only at point with the source (S=nil, D and P
  irrelevant).
- 'off-point: Show preview only away from point replacing the source. At
  point, show the source with an icon. Update preview immediately when
  regenerated, hiding source (S=t, D=icon, P=nil).
- 'off-point-deferred: Show preview only away from point replacing the source. 
At
  point, show the source with an icon. Defer updating the preview when
  regenerated until cursor moves out of source (S=t, D=icon, P=t).

This drops support for (S=t, D=preview, P=nil), but IMO this is a
useless mode since the visible preview will be updated when it is
generated and there's no need to hide the source on regeneration.

This proposal would be in addition to `preview-keep-stale-images` and
`preview-at-point-placement` above and would make the two variables
`preview-protect-point` and `preview-leave-open-previews-visible`
obsolete.

Best regards,
-- Al



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

Reply via email to