From: Juanma Barranquero <jmbarranquero@wke.es>
Cc: Andreas Schwab <schwab@suse.de>, emacs-devel@gnu.org
Subject: Re: [PATCH] Delayed loading of image libraries
Date: Thu, 01 Jul 2004 11:30:49 +0200 [thread overview]
Message-ID: <20040701110632.415E.JMBARRANQUERO@wke.es> (raw)
In-Reply-To: <20040630154234.GB28623@fencepost>
On Wed, 30 Jun 2004 11:42:34 -0400
Miles Bader <miles@gnu.org> wrote:
> The result of `create-image' can be saved in a lisp file, and later loaded,
> in which case the image will be displayed without `init-image-library' being
> called from `image-type-available-p'y
It can be loaded, sure, but can it be *displayed* without
`image-type-available-p' being called? I'd say that's a bug.
> I added a the call to make sure it
> always gets called one way or another.
The current situation is Not Good. Andreas has fixed your patch by
passing it Qnil, which "works" in the sense that init-image-library
doesn't fail. But:
- It is now effectively a noop, because init-image-library'ing any
image type from inside lookup_image_type will not load it.
- Emacs on Windows crashes on certain kinds of image files (notably
TIFFs). I think that's related to something I asked yesterday:
lookup_image_type can return NULL, but at places its return value is
just checked with xassert, which could be a noop, so it is posible
to end creating image types with image->type == NULL. Why it is
allowed?
- We could make image-library-alist available from C and pass it to
the call to init-image-library on lookup_image_type, but then, why
make LIBRARIES an optional argument *at all*? At first,
init-image-library didn't accept a second argument, it just used
image-library-alist, but Kim suggested passing it as an argument so
the user could manipulate it or supply an alternative loading list.
So, IMHO:
- We should make sure that image-type-available-p is called at the
right places, so lookup_image_type does not need to call
init-image-library.
- We should guarantee that lookup_image_type is not going to return
NULL (which doesn't make a lot of sense, as it is an internal
function and we control whether it gets a valid image type or not).
Juanma
next prev parent reply other threads:[~2004-07-01 9:30 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-10 12:38 [PATCH] Delayed loading of image libraries Juanma Barranquero
2004-06-30 10:15 ` Andreas Schwab
2004-06-30 11:13 ` Juanma Barranquero
2004-06-30 11:24 ` Andreas Schwab
2004-06-30 11:34 ` Juanma Barranquero
2004-06-30 11:41 ` Andreas Schwab
2004-06-30 13:00 ` Juanma Barranquero
2004-06-30 15:42 ` Miles Bader
2004-07-01 9:30 ` Juanma Barranquero [this message]
2004-07-01 9:48 ` Miles Bader
2004-07-01 10:13 ` Juanma Barranquero
2004-07-02 1:16 ` Miles Bader
2004-07-02 7:02 ` Juanma Barranquero
2004-07-02 7:10 ` David Kastrup
2004-07-02 7:41 ` Juanma Barranquero
2004-07-02 7:56 ` Miles Bader
2004-07-02 8:10 ` Juanma Barranquero
2004-07-02 8:20 ` Miles Bader
2004-07-02 8:45 ` Juanma Barranquero
2004-07-02 8:59 ` Miles Bader
2004-07-02 9:02 ` Miles Bader
2004-07-02 8:11 ` David Kastrup
2004-07-02 8:34 ` Juanma Barranquero
2004-07-03 18:21 ` Richard Stallman
2004-06-30 14:19 ` Stefan
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=20040701110632.415E.JMBARRANQUERO@wke.es \
--to=jmbarranquero@wke.es \
--cc=emacs-devel@gnu.org \
--cc=schwab@suse.de \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).