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: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Arash Esbati <arash <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#78627: closed ([PATCH] Flush preview images when leaving
 previews visible)
Date: Fri, 30 May 2025 15:30:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Fri, 30 May 2025 17:29:41 +0200
with message-id <m2tt52f76i.fsf <at> macmutant.fritz.box>
and subject line Re: bug#78627: [PATCH] Flush preview images when leaving previews visible
has caused the debbugs.gnu.org bug report #78627,
regarding [PATCH] Flush preview images when leaving previews visible
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
78627: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=78627
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: "Paul D. Nelson" <ultrono <at> gmail.com>
To: bug-auctex <at> gnu.org
Subject: [PATCH] Flush preview images when leaving previews visible
Date: Thu, 29 May 2025 10:58:30 +0200
[Message part 3 (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)]
[Message part 5 (message/rfc822, inline)]
From: Arash Esbati <arash <at> gnu.org>
To: "Paul D. Nelson" <ultrono <at> gmail.com>
Cc: 78627-done <at> debbugs.gnu.org
Subject: Re: bug#78627: [PATCH] Flush preview images when leaving previews
 visible
Date: Fri, 30 May 2025 17:29:41 +0200
"Paul D. Nelson" <ultrono <at> gmail.com> writes:

> Sorry, I didn't mean to delete the docstring -- attaching revised
> patch.

Thanks.  I moved the definition `preview-replace-active-icon' after
`preview-leave-open-previews-visible' in order to get rid of a compiler
warning.  Installed and closing.

Best, Arash


This bug report was last modified 17 days ago.

Previous Next


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