GNU bug report logs -
#28824
26.0.90; display of pbm images broken?
Previous Next
Reported by: "Roland Winkler" <winkler <at> gnu.org>
Date: Sat, 14 Oct 2017 02:12:02 UTC
Severity: normal
Found in version 26.0.90
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
Message #29 received at submit <at> debbugs.gnu.org (full text, mbox):
On Sat 14 Oct 2017, Eli Zaretskii wrote:
>> From: Andy Moreton <andrewjmoreton <at> gmail.com>
>> Date: Sat, 14 Oct 2017 20:03:27 +0100
>>
>> Further testing with the images from etc/images in emacs 26 shows that
>> this patch appears to fix the problem:
>>
>> diff --git a/lisp/image.el b/lisp/image.el
>> index 1d0776180b..32df508bc8 100644
>> --- a/lisp/image.el
>> +++ b/lisp/image.el
>> @@ -34,8 +34,8 @@ 'image-refresh
>> (defconst image-type-header-regexps
>> `(("\\`/[\t\n\r ]*\\*.*XPM.\\*/" . xpm)
>> ("\\`P[1-6]\\(?:\
>> -\\(?:\\(?:#[^\r\n]*[\r\n]\\)?[[:space:]]\\)+\
>> -\\(?:\\(?:#[^\r\n]*[\r\n]\\)?[0-9]\\)+\
>> +\\(?:\\(?:#[^\r\n]*[\r\n]\\)*[[:space:]]\\)+\
>> +\\(?:\\(?:#[^\r\n]*[\r\n]\\)*[0-9]\\)+\
>> \\)\\{2\\}" . pbm)
>> ("\\`GIF8[79]a" . gif)
>> ("\\`\x89PNG\r\n\x1a\n" . png)
>
> Thanks. However, I'm puzzled by the fact that it works here without
> any changes.
Loading the troublesome images from "emacs -Q" also works in unmodified
emacs 26, so something in my init.el changes the behaviour.
> Can you step with a debugger through the code in image.c and tell what
> exactly fails with the unmodified regexp?
The problem is in image.el, where string-match-p in image-type-from-data
fails to match the regexp.
AndyM
This bug report was last modified 7 years and 278 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.