GNU bug report logs - #78627
[PATCH] Flush preview images when leaving previews visible

Previous Next

Package: auctex;

Reported by: "Paul D. Nelson" <ultrono <at> gmail.com>

Date: Thu, 29 May 2025 08:59:02 UTC

Severity: normal

Tags: patch

Done: Arash Esbati <arash <at> gnu.org>

Full log


View this message in rfc822 format

From: "Paul D. Nelson" <ultrono <at> gmail.com>
To: 78627 <at> debbugs.gnu.org
Subject: bug#78627: [PATCH] Flush preview images when leaving previews visible
Date: Thu, 29 May 2025 10:58:30 +0200
[Message part 1 (text/plain, inline)]
Hi all,

This patch fixes a rare bug with the setting
preview-leave-open-previews-visible that I added last year.

"Recall" that with the default value nil for that setting, when the user
moves the point into a previewed region, the TeX code becomes visible
and a TeX icon is shown in place of the preview graphic.  On the other
hand, when the setting is t, the TeX icon is replaced by the old preview
image, which thus remains visible.  After editing the TeX code, the user
can then regenerate the preview image, either manually via the preview-*
commands or automatically via the ELPA package preview-auto.

Some users told me that the setting did not work correctly in shared
drives, such as Dropbox and OneDrive.  The symptom was that the image
would not update correctly after editing in the manner described above.
I was never able to reproduce the issue myself, but eventually stumbled
upon [1], which led to the attached patch, a variant of which yielded
positive feedback from two of the users who had noted the issue.

The patch is conservative in that it only affects users of the setting
preview-leave-open-previews-visible.  Any feedback welcome.

[1]
https://lists.gnu.org/archive/html/bug-gnu-emacs/2022-12/msg00681.html

Thanks, best,

Paul

[0001-Flush-preview-images-when-leaving-previews-visible.patch (text/x-patch, attachment)]

This bug report was last modified 16 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.