GNU bug report logs - #8640
24.0.50; no pbm support on cygwin

Previous Next

Package: emacs;

Reported by: Katsumi Yamaoka <yamaoka <at> jpl.org>

Date: Mon, 9 May 2011 01:48:02 UTC

Severity: normal

Found in version 24.0.50

Done: Juanma Barranquero <lekktu <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 8640 in the body.
You can then email your comments to 8640 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8640; Package emacs. (Mon, 09 May 2011 01:48:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Katsumi Yamaoka <yamaoka <at> jpl.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 09 May 2011 01:48:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Katsumi Yamaoka <yamaoka <at> jpl.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.0.50; no pbm support on cygwin
Date: Mon, 09 May 2011 10:46:48 +0900
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''
[...]




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8640; Package emacs. (Mon, 09 May 2011 10:56:02 GMT) Full text and rfc822 format available.

Message #8 received at 8640 <at> debbugs.gnu.org (full text, mbox):

From: Juanma Barranquero <lekktu <at> gmail.com>
To: Katsumi Yamaoka <yamaoka <at> jpl.org>
Cc: 8640 <at> debbugs.gnu.org
Subject: Re: bug#8640: 24.0.50; no pbm support on cygwin
Date: Mon, 9 May 2011 12:54:49 +0200
> 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);




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8640; Package emacs. (Tue, 10 May 2011 08:46:02 GMT) Full text and rfc822 format available.

Message #11 received at 8640 <at> debbugs.gnu.org (full text, mbox):

From: Katsumi Yamaoka <yamaoka <at> jpl.org>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: 8640 <at> debbugs.gnu.org
Subject: Re: bug#8640: 24.0.50; no pbm support on cygwin
Date: Tue, 10 May 2011 17:44:56 +0900
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.




Reply sent to Juanma Barranquero <lekktu <at> gmail.com>:
You have taken responsibility. (Tue, 10 May 2011 10:34:02 GMT) Full text and rfc822 format available.

Notification sent to Katsumi Yamaoka <yamaoka <at> jpl.org>:
bug acknowledged by developer. (Tue, 10 May 2011 10:34:02 GMT) Full text and rfc822 format available.

Message #16 received at 8640-done <at> debbugs.gnu.org (full text, mbox):

From: Juanma Barranquero <lekktu <at> gmail.com>
To: Katsumi Yamaoka <yamaoka <at> jpl.org>
Cc: 8640-done <at> debbugs.gnu.org
Subject: Re: bug#8640: 24.0.50; no pbm support on cygwin
Date: Tue, 10 May 2011 12:33:01 +0200
On Tue, May 10, 2011 at 10:44, Katsumi Yamaoka <yamaoka <at> 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




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 07 Jun 2011 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 334 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.