all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Evgeny Zajcev <lg.zevlg@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: Lazy image converters
Date: Mon, 17 Feb 2020 14:02:37 +0300	[thread overview]
Message-ID: <CAO=W_ZqDAfs1Tjk_v9XutOu6kJ86fcwYX9C==-_JuxyLgMMHog@mail.gmail.com> (raw)
In-Reply-To: <jwvmu9imuhb.fsf-monnier+emacs@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 956 bytes --]

вс, 16 февр. 2020 г. в 18:20, Stefan Monnier <monnier@iro.umontreal.ca>:

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

[-- Attachment #2: Type: text/html, Size: 1555 bytes --]

      reply	other threads:[~2020-02-17 11:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-12 14:11 Lazy image converters Evgeny Zajcev
2020-02-16 13:06 ` Lars Ingebrigtsen
2020-02-16 17:45   ` Evgeny Zajcev
2020-02-19 13:44     ` Lars Ingebrigtsen
2020-02-16 15:20 ` Stefan Monnier
2020-02-17 11:02   ` Evgeny Zajcev [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAO=W_ZqDAfs1Tjk_v9XutOu6kJ86fcwYX9C==-_JuxyLgMMHog@mail.gmail.com' \
    --to=lg.zevlg@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.