emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Lazy image converters


From: Evgeny Zajcev
Subject: Re: Lazy image converters
Date: Mon, 17 Feb 2020 14:02:37 +0300



вс, 16 февр. 2020 г. в 18:20, Stefan Monnier <address@hidden>:
> What if we have a lazy image, so its FILE-OR-DATA is calculated at
> redisplay time.  'image-convert' could utilize this.  One of the approaches
> to lazy images is to allow FILE-OR-DATA to be a function returning actual
> file or data.  Redisplay could call this func and substitute the value of
> FILE-OR-DATA in image spec with the results, kind of caching the results.

It's definitely worth a try.

I just realized another benefit of such an approach.  There is a long-standing bug in Emacs - when an image file is silently removed, there is no way to hook on this, so empty square displays in place of the image.  In case of the function as FILE-OR-DATA, redisplay may call it once again if corresponding image file has been removed.

Maybe we can do that using the existing jit-lock hook?

I'll look at it, thanks

--
lg

reply via email to

[Prev in Thread] Current Thread [Next in Thread]