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>

To reply to this bug, email your comments to 78627 AT debbugs.gnu.org.
There is no need to reopen the bug first.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-auctex <at> gnu.org:
bug#78627; Package auctex. (Thu, 29 May 2025 08:59:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Paul D. Nelson" <ultrono <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-auctex <at> gnu.org. (Thu, 29 May 2025 08:59:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

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 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)]

Information forwarded to bug-auctex <at> gnu.org:
bug#78627; Package auctex. (Thu, 29 May 2025 09:03:02 GMT) Full text and rfc822 format available.

Message #8 received at 78627 <at> debbugs.gnu.org (full text, mbox):

From: "Paul D. Nelson" <ultrono <at> gmail.com>
To: "Paul D. Nelson" <ultrono <at> gmail.com>
Cc: 78627 <at> debbugs.gnu.org
Subject: Re: bug#78627: [PATCH] Flush preview images when leaving previews
 visible
Date: Thu, 29 May 2025 11:01:59 +0200
[Message part 1 (text/plain, inline)]
Sorry, I didn't mean to delete the docstring -- attaching revised patch.

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

Reply sent to Arash Esbati <arash <at> gnu.org>:
You have taken responsibility. (Fri, 30 May 2025 15:30:01 GMT) Full text and rfc822 format available.

Notification sent to "Paul D. Nelson" <ultrono <at> gmail.com>:
bug acknowledged by developer. (Fri, 30 May 2025 15:30:02 GMT) Full text and rfc822 format available.

Message #13 received at 78627-done <at> debbugs.gnu.org (full text, mbox):

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 4 days ago.

Previous Next


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