From: Andy Moreton <andrewjmoreton@gmail.com>
To: 28824@debbugs.gnu.org
Subject: bug#28824: 26.0.90; display of pbm images broken?
Date: Sat, 14 Oct 2017 20:50:28 +0100 [thread overview]
Message-ID: <86vajh4igr.fsf@gmail.com> (raw)
In-Reply-To: <29226.45866.855134.23009@gargle.gargle.HOWL>
On Sat 14 Oct 2017, Eli Zaretskii wrote:
>> From: Andy Moreton <andrewjmoreton@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
next prev parent reply other threads:[~2017-10-14 19:50 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-14 2:10 bug#28824: 26.0.90; display of pbm images broken? Roland Winkler
2017-10-14 7:01 ` Eli Zaretskii
2017-10-14 15:01 ` Andy Moreton
2017-10-14 15:31 ` Eli Zaretskii
2017-10-14 18:16 ` Andy Moreton
2017-10-14 19:03 ` Andy Moreton
2017-10-14 19:16 ` Eli Zaretskii
2017-10-14 19:50 ` Andy Moreton [this message]
2017-10-14 20:15 ` Andy Moreton
2017-10-14 19:14 ` Eli Zaretskii
2017-10-14 21:52 ` Roland Winkler
2017-10-15 17:42 ` Andy Moreton
2017-10-15 18:49 ` Eli Zaretskii
2017-10-16 8:30 ` Paul Eggert
2017-10-16 15:11 ` Eli Zaretskii
2017-10-16 15:22 ` Roland Winkler
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=86vajh4igr.fsf@gmail.com \
--to=andrewjmoreton@gmail.com \
--cc=28824@debbugs.gnu.org \
/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).