* bug#8640: 24.0.50; no pbm support on cygwin
@ 2011-05-09 1:46 Katsumi Yamaoka
2011-05-09 10:54 ` Juanma Barranquero
0 siblings, 1 reply; 4+ messages in thread
From: Katsumi Yamaoka @ 2011-05-09 1:46 UTC (permalink / raw)
To: 8640
Hi,
pbm image is not available in Emacs trunk built on cygwin at least
after May 6: (image-type-available-p 'pbm) => nil
Whereas png, jpeg, gif, xpm, etc. are all ok. I guess this is due
to the recent changes in image.c. Any hint? Thanks.
In GNU Emacs 24.0.50.1 (i686-pc-cygwin, X toolkit, Xaw3d scroll bars)
of 2011-05-09 on localhost
Windowing system distributor `The Cygwin/X Project', version 11.0.11000000
configured using `configure '--verbose' '--with-x-toolkit=lucid''
[...]
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#8640: 24.0.50; no pbm support on cygwin
2011-05-09 1:46 bug#8640: 24.0.50; no pbm support on cygwin Katsumi Yamaoka
@ 2011-05-09 10:54 ` Juanma Barranquero
2011-05-10 8:44 ` Katsumi Yamaoka
0 siblings, 1 reply; 4+ messages in thread
From: Juanma Barranquero @ 2011-05-09 10:54 UTC (permalink / raw)
To: Katsumi Yamaoka; +Cc: 8640
> pbm image is not available in Emacs trunk built on cygwin at least
> after May 6: (image-type-available-p 'pbm) => nil
> Whereas png, jpeg, gif, xpm, etc. are all ok.
xbm is not available either. And of course is not cygwin-specific.
> I guess this is due
> to the recent changes in image.c.
Yes.
> Any hint?
More than a hint. I moved the library cache variable to w32 code,
turned CACHE_IMAGE_TYPE into a noop on non-Windows, and removed the
check on init-image-library. But I overlook the fact that the
predefined image types rely on being marked in the library cache as
available. That's because `image-type-available-p' always goes through
`init-image-library'.
Now, the fix is simple (the patch below fixes the problem), but we
should think whether it is cleaner to restore the library-cache to a
non-Windows specific code, or mark the only two predefined image types
in any other way, as the code below does. It's a bit ad-hoc, but
having the image types in the library cache, when they are not, in
fact, loaded from a library, is also a bit ugly.
Opinions and comments anyone?
Juanma
=== modified file 'src/image.c'
--- src/image.c 2011-05-06 06:30:56 +0000
+++ src/image.c 2011-05-09 10:53:21 +0000
@@ -8602,6 +8602,11 @@
of `dynamic-library-alist', which see). */)
(Lisp_Object type, Lisp_Object libraries)
{
+
+ /* Types pbm and xbm are predefined and always available. */
+ if (EQ (type, Qpbm) || EQ (type, Qxbm))
+ return Qt;
+
#ifdef HAVE_NTGUI
/* Don't try to reload the library. */
Lisp_Object tested = Fassq (type, Vlibrary_cache);
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#8640: 24.0.50; no pbm support on cygwin
2011-05-09 10:54 ` Juanma Barranquero
@ 2011-05-10 8:44 ` Katsumi Yamaoka
2011-05-10 10:33 ` Juanma Barranquero
0 siblings, 1 reply; 4+ messages in thread
From: Katsumi Yamaoka @ 2011-05-10 8:44 UTC (permalink / raw)
To: Juanma Barranquero; +Cc: 8640
Juanma Barranquero wrote:
>> pbm image is not available in Emacs trunk built on cygwin at least
>> after May 6: (image-type-available-p 'pbm) => nil
>> Whereas png, jpeg, gif, xpm, etc. are all ok.
> xbm is not available either. And of course is not cygwin-specific.
Oh, that's bad. I didn't verify it for xbm and other platforms.
>> I guess this is due
>> to the recent changes in image.c.
> Yes.
>> Any hint?
> More than a hint. I moved the library cache variable to w32 code,
> turned CACHE_IMAGE_TYPE into a noop on non-Windows, and removed the
> check on init-image-library. But I overlook the fact that the
> predefined image types rely on being marked in the library cache as
> available. That's because `image-type-available-p' always goes through
> `init-image-library'.
> Now, the fix is simple (the patch below fixes the problem), but we
> should think whether it is cleaner to restore the library-cache to a
> non-Windows specific code, or mark the only two predefined image types
> in any other way, as the code below does. It's a bit ad-hoc, but
> having the image types in the library cache, when they are not, in
> fact, loaded from a library, is also a bit ugly.
> Opinions and comments anyone?
The patch did the trick. I hope it is installed even if it is
not smart. It troubles at least Gnus users, since Gnus invokes
ImageMagick's `display' whenever an article contains X-Face (it
is the default behavior when pbm is unavailable). ;-) Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#8640: 24.0.50; no pbm support on cygwin
2011-05-10 8:44 ` Katsumi Yamaoka
@ 2011-05-10 10:33 ` Juanma Barranquero
0 siblings, 0 replies; 4+ messages in thread
From: Juanma Barranquero @ 2011-05-10 10:33 UTC (permalink / raw)
To: Katsumi Yamaoka; +Cc: 8640-done
On Tue, May 10, 2011 at 10:44, Katsumi Yamaoka <yamaoka@jpl.org> wrote:
> The patch did the trick. I hope it is installed even if it is
> not smart.
I think it's the easiest and cleanest fix, so I've installed it
(slightly tweaked).
Juanma
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-05-10 10:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-09 1:46 bug#8640: 24.0.50; no pbm support on cygwin Katsumi Yamaoka
2011-05-09 10:54 ` Juanma Barranquero
2011-05-10 8:44 ` Katsumi Yamaoka
2011-05-10 10:33 ` Juanma Barranquero
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.