From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Andy Moreton Newsgroups: gmane.emacs.bugs Subject: bug#28824: 26.0.90; display of pbm images broken? Date: Sat, 14 Oct 2017 20:50:28 +0100 Message-ID: <86vajh4igr.fsf@gmail.com> References: <29226.45866.855134.23009@gargle.gargle.HOWL> <83376mjjq7.fsf@gnu.org> <86po9p93jz.fsf@gmail.com> <83d15piw5l.fsf@gnu.org> <86lgkd8uj8.fsf@gmail.com> <86h8v18scg.fsf@gmail.com> <83376lilpm.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1508010742 27849 195.159.176.226 (14 Oct 2017 19:52:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 14 Oct 2017 19:52:22 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (windows-nt) To: 28824@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 14 21:52:18 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e3STf-0005Sb-DA for geb-bug-gnu-emacs@m.gmane.org; Sat, 14 Oct 2017 21:52:08 +0200 Original-Received: from localhost ([::1]:55056 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e3STk-0005iR-4P for geb-bug-gnu-emacs@m.gmane.org; Sat, 14 Oct 2017 15:52:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41782) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e3STe-0005iB-8k for bug-gnu-emacs@gnu.org; Sat, 14 Oct 2017 15:52:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e3STa-00063e-CH for bug-gnu-emacs@gnu.org; Sat, 14 Oct 2017 15:52:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60095) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e3STa-00063Z-8m for bug-gnu-emacs@gnu.org; Sat, 14 Oct 2017 15:52:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e3STa-0002CJ-0i for bug-gnu-emacs@gnu.org; Sat, 14 Oct 2017 15:52:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <29226.45866.855134.23009@gargle.gargle.HOWL> Resent-From: Andy Moreton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 14 Oct 2017 19:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28824 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15080106688380 (code B ref -1); Sat, 14 Oct 2017 19:52:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 14 Oct 2017 19:51:08 +0000 Original-Received: from localhost ([127.0.0.1]:40543 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e3SSh-0002B5-NW for submit@debbugs.gnu.org; Sat, 14 Oct 2017 15:51:07 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:50641) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e3SSg-0002Ab-Iu for submit@debbugs.gnu.org; Sat, 14 Oct 2017 15:51:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e3SSa-0005iR-DY for submit@debbugs.gnu.org; Sat, 14 Oct 2017 15:51:01 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:44898) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e3SSa-0005iK-9m for submit@debbugs.gnu.org; Sat, 14 Oct 2017 15:51:00 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41606) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e3SSZ-0005YS-5U for bug-gnu-emacs@gnu.org; Sat, 14 Oct 2017 15:51:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e3SSV-0005ft-8l for bug-gnu-emacs@gnu.org; Sat, 14 Oct 2017 15:50:59 -0400 Original-Received: from [195.159.176.226] (port=39925 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e3SSV-0005fP-1n for bug-gnu-emacs@gnu.org; Sat, 14 Oct 2017 15:50:55 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1e3SSH-0003AW-AE for bug-gnu-emacs@gnu.org; Sat, 14 Oct 2017 21:50:41 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 38 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:6/k+veJjlGj5hJHnWLwAdU2shZU= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:138418 Archived-At: On Sat 14 Oct 2017, Eli Zaretskii wrote: >> From: Andy Moreton >> 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