Subject: Re: bug#59902: 30.0.50; Image overlay is not updated until the cursor moves to the overlay

From: Eli Zaretskii <[email-masked]>
Date: Sat, 10 Dec 2022 16:18:44 +0200

> From: Ihor Radchenko <[email-masked]>
> Cc: [email-masked]
> Date: Sat, 10 Dec 2022 11:10:19 +0000
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> >> The current Emacs' behaviour is unexpected and very confusing here.
> >> Ideally, Emacs should be able to judge by itself whether to update
> >> cached image in memory.
> >
> > You want Emacs to hit the disk and process the file on each redisplay
> > cycle?
> 
> No. It can be less frequent. Maybe just when a new image view is created
> (like in overlay). Or maybe on timer - make images in the image cache
> expire after some time.

The image-handling code doesn't necessarily know where the image came
from.

The idea of clearing images from time to time was discussed, but AFAIR
we didn't find a good way that fits all the needs for doing so.

I think this is best left to the application level.  In particular, in
this case, the application _knows_ when it will replace the image
file.