From: Mathias Dahl <brakjoller.rem0veth1s@gmail.com>
Subject: Re: Can I avoid using `clear-image-cache'?
Date: Mon, 09 May 2005 08:01:41 +0200 [thread overview]
Message-ID: <umzr5rl8a.fsf@gmail.com> (raw)
In-Reply-To: 7ewtqcbq17.fsf@ada2.unipv.it
Thien-Thi Nguyen <ttn@glug.org> writes:
> i just looked at image.c:1661 (lookup_image), which sez:
>
> /* If not found, create a new image and cache it. */
> if (img == NULL)
>
> probably immediately prior to this block is the best place to add
> a file timestamp check. that's not as pretty a solution as fully
> generalizing the check to some kind of `:volatile VOLATILE-SPEC':
>
> :volatile VOLATILE-SPEC
>
> If VOLATILE-SPEC is t, take extra steps to check for "image
> change" so that image-cache lookup can DTRT [obviously this
> documentation can be improved ;-]. If :file is specified,
> use the timestamp of the file. Otherwise, compute a hash of
> the data and use that to detect change.
>
> VOLATILE-SPEC may also be a function that takes one argument,
> either the file timestamp or the data (as a string), and returns
> non-nil to indicate that the image has changed.
>
> i was all fired up and ready to do some quick munging and post
> code (thereby procrastinating on other emacs munging for vms :-),
> but then i saw how image.c leaves file loading to each image type
> (not enough abstraction for my tastes) so all the gumption seeped
> away...
>
> perhaps post-release i (or someone else) will do the requisite
> refactoring so that :volatile or like can be added more easily.
Sounds like a good idea. I can wait, my hack is working quite nicely
for now.
/Mathias
prev parent reply other threads:[~2005-05-09 6:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-06 9:27 Can I avoid using `clear-image-cache'? Mathias Dahl
2005-05-06 10:35 ` Thien-Thi Nguyen
2005-05-09 6:01 ` Mathias Dahl [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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=umzr5rl8a.fsf@gmail.com \
--to=brakjoller.rem0veth1s@gmail.com \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).