GNU bug report logs - #39994
27.0.90; Broken image-converter probe for imagemagick

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Juri Linkov <juri@HIDDEN>; Keywords: patch; dated Mon, 9 Mar 2020 02:38:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Removed tag(s) fixed. Request was from Juri Linkov <juri@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
bug No longer marked as fixed in versions 27.1 and reopened. Request was from Debbugs Internal Request <help-debbugs@HIDDEN> to internal_control <at> debbugs.gnu.org. Full text available.

Message received at 39994 <at> debbugs.gnu.org:


Received: (at 39994) by debbugs.gnu.org; 16 Mar 2020 00:33:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 15 20:33:32 2020
Received: from localhost ([127.0.0.1]:35848 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jDdhE-0005b3-Ct
	for submit <at> debbugs.gnu.org; Sun, 15 Mar 2020 20:33:32 -0400
Received: from bongo.elm.relay.mailchannels.net ([23.83.212.21]:14042)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1jDdhB-0005as-V4
 for 39994 <at> debbugs.gnu.org; Sun, 15 Mar 2020 20:33:30 -0400
X-Sender-Id: dreamhost|x-authsender|jurta@HIDDEN
Received: from relay.mailchannels.net (localhost [127.0.0.1])
 by relay.mailchannels.net (Postfix) with ESMTP id BD1EC400FE5;
 Mon, 16 Mar 2020 00:33:27 +0000 (UTC)
Received: from pdx1-sub0-mail-a100.g.dreamhost.com
 (100-96-1-27.trex.outbound.svc.cluster.local [100.96.1.27])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id 42E53400F88;
 Mon, 16 Mar 2020 00:33:27 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|jurta@HIDDEN
Received: from pdx1-sub0-mail-a100.g.dreamhost.com ([TEMPUNAVAIL].
 [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384)
 by 0.0.0.0:2500 (trex/5.18.5); Mon, 16 Mar 2020 00:33:27 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|jurta@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Tangy-Oafish: 255717e559ab225d_1584318807547_2734622231
X-MC-Loop-Signature: 1584318807547:2035523667
X-MC-Ingress-Time: 1584318807546
Received: from pdx1-sub0-mail-a100.g.dreamhost.com (localhost [127.0.0.1])
 by pdx1-sub0-mail-a100.g.dreamhost.com (Postfix) with ESMTP id 07816B2178;
 Sun, 15 Mar 2020 17:33:22 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc
 :subject:references:date:in-reply-to:message-id:mime-version
 :content-type:content-transfer-encoding; s=linkov.net; bh=IRJAis
 NkxETRWWt0L336qi2Y3KI=; b=wnpbiDaBVBOEGO+Qo+XxHEv39tm+YmtNp51Hhi
 206Tx3UaKWni84Ai7EDdyyssEWk57+h3sz6BkkksR3HLfw6BH80wKHwHQFFMSVmK
 2zmcmeTs+dj6YoJjwLdec0HeInMoWAjUIWUfyg/qFEJ8w4MViwJ5puKgmbMXwJY8
 57Kqk=
Received: from mail.jurta.org (m91-129-107-65.cust.tele2.ee [91.129.107.65])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 (Authenticated sender: jurta@HIDDEN)
 by pdx1-sub0-mail-a100.g.dreamhost.com (Postfix) with ESMTPSA id 70B49B2179;
 Sun, 15 Mar 2020 17:33:19 -0700 (PDT)
X-DH-BACKEND: pdx1-sub0-mail-a100
From: Juri Linkov <juri@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#39994: 27.0.90; Broken image-converter probe for imagemagick
Organization: LINKOV.NET
References: <87d09mpexq.fsf@HIDDEN> <877dztopns.fsf@HIDDEN>
 <87mu8p9mjj.fsf@HIDDEN> <87fteb16x0.fsf@HIDDEN>
 <87wo7ma3n7.fsf@HIDDEN>
Date: Mon, 16 Mar 2020 02:23:44 +0200
In-Reply-To: <87wo7ma3n7.fsf@HIDDEN> (Juri Linkov's message of "Sun, 
 15 Mar 2020 02:00:12 +0200")
Message-ID: <87lfo19mgf.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
X-VR-OUT-STATUS: OK
X-VR-OUT-SCORE: -100
X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedugedrudefuddgleduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgfgsehtkeertddtreejnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtjedrieehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdejrdeihedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehlrghrshhisehgnhhushdrohhrgh
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 39994
Cc: 39994 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Since now it's pretest time, I gave it more testing, and found more probl=
ems:

1. AFAIR one of the goals for creating image-converter.el
was to handle such rare image formats as WEBP,
but I tried to open a webp file, and image-converter failed
because it doesn't recognize WEBP.

There is no WEBP mentioned in the output of "identify -list format".
After installing `apt-get install webp`, another command
"identify -list delegate" reports its support with:

  Delegate                Command
  -----------------------------------------------------------------------=
--------
         webp =3D>          "dwebp' -pam '%i' -o '%o"
          png<=3D webp      "cwebp' -quiet %Q '%i' -o '%o"

2. After adding manually webp to image-converter-regexp,
there is another problem: image-converter--convert-magick
calls the command with

  (apply #'call-process (car command)
         nil t nil

where the arg 't' means to mix standard error output with ordinary output=
,
but ImageMagick outputs some info messages to stderr, e.g.:

  Decoded /tmp/magick-20114vaPD-fxUjRW4. Dimensions: 320 x 214 . Format: =
lossy. Now saving...
  Saved file /tmp/magick-20114h1Jh0D04beDR

thus breaking the image output.

3. Visiting an image file from an archive signals the error

  Cannot display image: (IMAGE-FORMAT should be a symbol like =E2=80=98im=
age/png=E2=80=99)

4. Exif fails to visit images with the error:

  Cannot display image: (sequencep 122)

Shouldn't exif code be called with ignore-errors, so its errors won't
affect the image displaying?

Test case:

  exif --output=3Dblackz.jpg --tag=3DArtist --ifd=3D0 --set-value=3D'z' t=
est/data/image/black.jpg

Exif fails to handle ASCII field values whose length is less than 4.
In the above example the length of the 'Artist' field is 1 ('z').




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39994; Package emacs. Full text available.

Message received at 39994 <at> debbugs.gnu.org:


Received: (at 39994) by debbugs.gnu.org; 16 Mar 2020 00:33:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 15 20:33:24 2020
Received: from localhost ([127.0.0.1]:35843 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jDdh5-0005aT-Pk
	for submit <at> debbugs.gnu.org; Sun, 15 Mar 2020 20:33:24 -0400
Received: from caracal.birch.relay.mailchannels.net ([23.83.209.30]:41070)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>)
 id 1jDdh4-0005aH-5P; Sun, 15 Mar 2020 20:33:22 -0400
X-Sender-Id: dreamhost|x-authsender|jurta@HIDDEN
Received: from relay.mailchannels.net (localhost [127.0.0.1])
 by relay.mailchannels.net (Postfix) with ESMTP id DBA08340188;
 Mon, 16 Mar 2020 00:33:20 +0000 (UTC)
Received: from pdx1-sub0-mail-a100.g.dreamhost.com
 (100-96-42-19.trex.outbound.svc.cluster.local [100.96.42.19])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id 61A61340F40;
 Mon, 16 Mar 2020 00:33:20 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|jurta@HIDDEN
Received: from pdx1-sub0-mail-a100.g.dreamhost.com ([TEMPUNAVAIL].
 [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384)
 by 0.0.0.0:2500 (trex/5.18.5); Mon, 16 Mar 2020 00:33:20 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|jurta@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Company-Troubled: 69385cd80143c546_1584318800640_1988119362
X-MC-Loop-Signature: 1584318800640:643092728
X-MC-Ingress-Time: 1584318800639
Received: from pdx1-sub0-mail-a100.g.dreamhost.com (localhost [127.0.0.1])
 by pdx1-sub0-mail-a100.g.dreamhost.com (Postfix) with ESMTP id 1ECEFB2173;
 Sun, 15 Mar 2020 17:33:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc
 :subject:references:date:in-reply-to:message-id:mime-version
 :content-type; s=linkov.net; bh=WUxDtt060sSbDfjbF9DRYe+xc6A=; b=
 1WlYdOIOIKgKkkuWXdtH7nRBFsB22+hhQWIMmO+CV7zZ9JCbyAwj1aCtSXRnOuuh
 rYCYzWpDY20olIfwbQZmEdxZaOZZZzSQZEcqXHTlvFyExyR5vfs++rR3F7OktR6x
 xUVxgAFhyCL8WPgVMFNTYCIRxAlmVu1az8uguPG0f9g=
Received: from mail.jurta.org (m91-129-107-65.cust.tele2.ee [91.129.107.65])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 (Authenticated sender: jurta@HIDDEN)
 by pdx1-sub0-mail-a100.g.dreamhost.com (Postfix) with ESMTPSA id 25C29B2178;
 Sun, 15 Mar 2020 17:33:12 -0700 (PDT)
X-DH-BACKEND: pdx1-sub0-mail-a100
From: Juri Linkov <juri@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#39994: 27.0.90; Broken image-converter probe for imagemagick
Organization: LINKOV.NET
References: <87d09mpexq.fsf@HIDDEN> <877dztopns.fsf@HIDDEN>
 <87mu8p9mjj.fsf@HIDDEN> <87fteb16x0.fsf@HIDDEN>
 <87wo7ma3n7.fsf@HIDDEN>
Date: Mon, 16 Mar 2020 02:04:58 +0200
In-Reply-To: <87wo7ma3n7.fsf@HIDDEN> (Juri Linkov's message of "Sun, 
 15 Mar 2020 02:00:12 +0200")
Message-ID: <87v9n5cggl.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-VR-OUT-STATUS: OK
X-VR-OUT-SCORE: -100
X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedugedrudefuddgleduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdejrdeiheenucevlhhushhtvghrufhiiigvpeefnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtjedrieehpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheplhgrrhhsihesghhnuhhsrdhorhhg
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 39994
Cc: 39994 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

reopen 39994
tags 39994 - fixed
quit

>> We put imagemagick at the end because of the same reason we're
>> deprecating libmagick in Emacs -- imagemagick has had en enormous number
>> of exploitable bugs over the years.  Running external programs mitigates
>> this slightly, but it should remain the last option.
>
> Right.  I moved it up only because I was lazy to restart Emacs -
> currently customization of image-converter requires restarting Emacs,
> but it's not a big problem.

Sorry, I misremembered - actually it *is* a problem,
since handling customization is not yet implemented.

Here is a possible implementation:

diff --git a/lisp/image/image-converter.el b/lisp/image/image-converter.el
index 0488a13d41..4efae5c202 100644
--- a/lisp/image/image-converter.el
+++ b/lisp/image/image-converter.el
@@ -57,6 +57,10 @@ image-convert-p
   ;; Find an installed image converter.
   (unless image-converter
     (image-converter--find-converter))
+  ;; When image-converter was customized
+  (if (and image-converter (not image-converter-regexp))
+      (when-let ((formats (image-converter--probe image-converter)))
+        (setq image-converter-regexp (concat "\\." (regexp-opt formats) "\\'"))))
   (and image-converter
        (or (and (not data-p)
                 (string-match image-converter-regexp source))




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39994; Package emacs. Full text available.
bug marked as fixed in version 27.1, send any further explanations to 39994 <at> debbugs.gnu.org and Juri Linkov <juri@HIDDEN> Request was from Juri Linkov <juri@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Added tag(s) fixed. Request was from Juri Linkov <juri@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 39994 <at> debbugs.gnu.org:


Received: (at 39994) by debbugs.gnu.org; 15 Mar 2020 00:05:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 14 20:05:11 2020
Received: from localhost ([127.0.0.1]:34092 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jDGmE-0002LX-Mq
	for submit <at> debbugs.gnu.org; Sat, 14 Mar 2020 20:05:10 -0400
Received: from bird.elm.relay.mailchannels.net ([23.83.212.17]:56432)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>)
 id 1jDGmC-0002LI-SM; Sat, 14 Mar 2020 20:05:09 -0400
X-Sender-Id: dreamhost|x-authsender|jurta@HIDDEN
Received: from relay.mailchannels.net (localhost [127.0.0.1])
 by relay.mailchannels.net (Postfix) with ESMTP id 9CE5F21D6F;
 Sun, 15 Mar 2020 00:05:07 +0000 (UTC)
Received: from pdx1-sub0-mail-a76.g.dreamhost.com
 (100-96-206-102.trex.outbound.svc.cluster.local [100.96.206.102])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id 1C3792151C;
 Sun, 15 Mar 2020 00:05:07 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|jurta@HIDDEN
Received: from pdx1-sub0-mail-a76.g.dreamhost.com ([TEMPUNAVAIL].
 [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384)
 by 0.0.0.0:2500 (trex/5.18.5); Sun, 15 Mar 2020 00:05:07 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|jurta@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Average-Fumbling: 0cb01b5c401fa78f_1584230707390_3706981843
X-MC-Loop-Signature: 1584230707390:1047976448
X-MC-Ingress-Time: 1584230707389
Received: from pdx1-sub0-mail-a76.g.dreamhost.com (localhost [127.0.0.1])
 by pdx1-sub0-mail-a76.g.dreamhost.com (Postfix) with ESMTP id CEE53B0599;
 Sat, 14 Mar 2020 17:05:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc
 :subject:references:date:in-reply-to:message-id:mime-version
 :content-type; s=linkov.net; bh=jDPGB+xCGPlGy7VAenrTwxNcbXs=; b=
 g1wr8xTxJI7lBNcPK6da4bc4PHUaHpIZnYkPHe1mb+5XRLq7uPCHs4j+OSaUIFyu
 QgTnAeknDnuKw9P1a8U1E0KEqAbkrputLfdGoAmKc3GPjD2MsvwLKhOQ7Tae7Fwy
 kj3JLqLHonykikZXfgoRLdud2zf0QUHgPX2uQRzQnpw=
Received: from mail.jurta.org (m91-129-107-65.cust.tele2.ee [91.129.107.65])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 (Authenticated sender: jurta@HIDDEN)
 by pdx1-sub0-mail-a76.g.dreamhost.com (Postfix) with ESMTPSA id 274FCB05B1;
 Sat, 14 Mar 2020 17:04:59 -0700 (PDT)
X-DH-BACKEND: pdx1-sub0-mail-a76
From: Juri Linkov <juri@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#39994: 27.0.90; Broken image-converter probe for imagemagick
Organization: LINKOV.NET
References: <87d09mpexq.fsf@HIDDEN> <877dztopns.fsf@HIDDEN>
 <87mu8p9mjj.fsf@HIDDEN> <87fteb16x0.fsf@HIDDEN>
Date: Sun, 15 Mar 2020 02:00:12 +0200
In-Reply-To: <87fteb16x0.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Sat,
 14 Mar 2020 13:02:03 +0100")
Message-ID: <87wo7ma3n7.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-VR-OUT-STATUS: OK
X-VR-OUT-SCORE: -100
X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedugedrudeftddguddvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdejrdeiheenucevlhhushhtvghrufhiiigvpeefnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtjedrieehpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheplhgrrhhsihesghhnuhhsrdhorhhg
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 39994
Cc: 39994 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

tags 39994 fixed
close 39994 27.1
quit

>> I propose to change the order because ffmpeg doesn't support too much
>> image formats, so it is less useful than imagemagick when both
>> imagemagick and ffmpeg are installed at the same time.
>
> We put imagemagick at the end because of the same reason we're
> deprecating libmagick in Emacs -- imagemagick has had en enormous number
> of exploitable bugs over the years.  Running external programs mitigates
> this slightly, but it should remain the last option.

Right.  I moved it up only because I was lazy to restart Emacs -
currently customization of image-converter requires restarting Emacs,
but it's not a big problem.

>> Oh, I haven't noticed the comment, I don't know why, now updated:
>
> Looks good to me; please apply.

Done.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39994; Package emacs. Full text available.

Message received at 39994 <at> debbugs.gnu.org:


Received: (at 39994) by debbugs.gnu.org; 14 Mar 2020 12:02:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 14 08:02:14 2020
Received: from localhost ([127.0.0.1]:60684 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jD5Uc-0003wQ-Lq
	for submit <at> debbugs.gnu.org; Sat, 14 Mar 2020 08:02:14 -0400
Received: from quimby.gnus.org ([95.216.78.240]:56378)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1jD5Ua-0003rg-Ta
 for 39994 <at> debbugs.gnu.org; Sat, 14 Mar 2020 08:02:13 -0400
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1jD5US-0001Vs-1z; Sat, 14 Mar 2020 13:02:06 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#39994: 27.0.90; Broken image-converter probe for imagemagick
References: <87d09mpexq.fsf@HIDDEN> <877dztopns.fsf@HIDDEN>
 <87mu8p9mjj.fsf@HIDDEN>
Date: Sat, 14 Mar 2020 13:02:03 +0100
In-Reply-To: <87mu8p9mjj.fsf@HIDDEN> (Juri Linkov's message of "Tue, 
 10 Mar 2020 00:43:44 +0200")
Message-ID: <87fteb16x0.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Juri Linkov <juri@HIDDEN> writes: > I propose to change
 the order because ffmpeg doesn't support too much > image formats, so it
 is less useful than imagemagick when both > imagemagick and ffmpeg are
 installed at the same time. 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was
 blocked.  See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
 for more information. [URIs: ingebrigtsen.no]
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 39994
Cc: 39994 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Juri Linkov <juri@HIDDEN> writes:

> I propose to change the order because ffmpeg doesn't support too much
> image formats, so it is less useful than imagemagick when both
> imagemagick and ffmpeg are installed at the same time.

We put imagemagick at the end because of the same reason we're
deprecating libmagick in Emacs -- imagemagick has had en enormous number
of exploitable bugs over the years.  Running external programs mitigates
this slightly, but it should remain the last option.

> Oh, I haven't noticed the comment, I don't know why, now updated:

Looks good to me; please apply.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39994; Package emacs. Full text available.

Message received at 39994 <at> debbugs.gnu.org:


Received: (at 39994) by debbugs.gnu.org; 9 Mar 2020 22:58:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 09 18:58:42 2020
Received: from localhost ([127.0.0.1]:51606 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jBRM9-0002qd-P9
	for submit <at> debbugs.gnu.org; Mon, 09 Mar 2020 18:58:42 -0400
Received: from azure.elm.relay.mailchannels.net ([23.83.212.7]:10814)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1jBRM6-0002qG-Sl
 for 39994 <at> debbugs.gnu.org; Mon, 09 Mar 2020 18:58:40 -0400
X-Sender-Id: dreamhost|x-authsender|jurta@HIDDEN
Received: from relay.mailchannels.net (localhost [127.0.0.1])
 by relay.mailchannels.net (Postfix) with ESMTP id 31C392604DB;
 Mon,  9 Mar 2020 22:58:36 +0000 (UTC)
Received: from pdx1-sub0-mail-a70.g.dreamhost.com
 (100-96-217-49.trex.outbound.svc.cluster.local [100.96.217.49])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id A325E2609CC;
 Mon,  9 Mar 2020 22:58:35 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|jurta@HIDDEN
Received: from pdx1-sub0-mail-a70.g.dreamhost.com ([TEMPUNAVAIL].
 [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384)
 by 0.0.0.0:2500 (trex/5.18.5); Mon, 09 Mar 2020 22:58:36 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|jurta@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Coil-Bitter: 6fa0ac7b48364672_1583794715913_353905955
X-MC-Loop-Signature: 1583794715913:918981403
X-MC-Ingress-Time: 1583794715912
Received: from pdx1-sub0-mail-a70.g.dreamhost.com (localhost [127.0.0.1])
 by pdx1-sub0-mail-a70.g.dreamhost.com (Postfix) with ESMTP id 59E037F0E3;
 Mon,  9 Mar 2020 15:58:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc
 :subject:references:date:in-reply-to:message-id:mime-version
 :content-type; s=linkov.net; bh=XF0+tH4IgGfx6+wYsNGlXseMH/Y=; b=
 0WVYDUGEgEUKfX3Q4g2VPCRG+T8upATn8E5wD1dob6L8GsjI1OUQaNiy26MSd02+
 vmSEqORJNKZgvc3AVZs81C/k1EnX+Mc9ij3emZjuao6imsConVK5bidpVu/x40BC
 KPMYlnygPGY+/K57e26V9Xp9OP1kD4LEPS0iJOcqRHc=
Received: from mail.jurta.org (m91-129-103-27.cust.tele2.ee [91.129.103.27])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 (Authenticated sender: jurta@HIDDEN)
 by pdx1-sub0-mail-a70.g.dreamhost.com (Postfix) with ESMTPSA id A4E2F7F0C6;
 Mon,  9 Mar 2020 15:58:32 -0700 (PDT)
X-DH-BACKEND: pdx1-sub0-mail-a70
From: Juri Linkov <juri@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#39994: 27.0.90; Broken image-converter probe for imagemagick
Organization: LINKOV.NET
References: <87d09mpexq.fsf@HIDDEN> <877dztopns.fsf@HIDDEN>
Date: Tue, 10 Mar 2020 00:43:44 +0200
In-Reply-To: <877dztopns.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Mon,
 09 Mar 2020 10:15:03 +0100")
Message-ID: <87mu8p9mjj.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-VR-OUT-STATUS: OK
X-VR-OUT-SCORE: -100
X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedugedrudduledgtdefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdefrddvjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtfedrvdejpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheplhgrrhhsihesghhnuhhsrdhorhhg
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 39994
Cc: 39994 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>> Then I tried imagemagick, but image-converter said .ico format is unsupported.
>> Whereas running `convert -list format` outputs:
>>
>>    Format  Module    Mode  Description
>> -------------------------------------------------------------------------------
>>       ICO* ICON      rw+   Microsoft icon
>>
>> So this patch adds the support for the 'Module' column to imagemagick probe:
>
> Ah, so some versions have an additional column in there?  My convert
> -list format outputs:
>
>       ICO* rw+   Microsoft icon

Maybe because my version is too old:
ImageMagick 6.9.7-4 Q16 x86_64 20170114

>>  (defvar image-converter--converters
>>    '((graphicsmagick :command ("gm" "convert") :probe ("-list" "format"))
>> -    (ffmpeg :command "ffmpeg" :probe "-decoders")
>> -    (imagemagick :command "convert" :probe ("-list" "format")))
>> +    (imagemagick :command "convert" :probe ("-list" "format"))
>> +    (ffmpeg :command "ffmpeg" :probe "-decoders"))
>>    "List of supported image converters to try.")
>
> Was this part included by mistake?  It changes the order the converters
> are tested.

I propose to change the order because ffmpeg doesn't support too much
image formats, so it is less useful than imagemagick when both
imagemagick and ffmpeg are installed at the same time.

>>          ;; Lines look like
>>          ;; "      WPG* r--   Word Perfect Graphics".
>> -        (while (re-search-forward "^ *\\([A-Z0-9]+\\)\\*? +r" nil t)
>> +        (while (re-search-forward "^ *\\([A-Z0-9]+\\)\\*?\\(?: +[A-Z0-9]+\\)? +r" nil t)
>
> Look OK to me, but the comment should be amended to reflect the two
> different line formats it's now matching.

Oh, I haven't noticed the comment, I don't know why, now updated:

diff --git a/lisp/image/image-converter.el b/lisp/image/image-converter.el
index 0488a13d41..3d74b8b30c 100644
--- a/lisp/image/image-converter.el
+++ b/lisp/image/image-converter.el
@@ -149,8 +149,9 @@ image-converter--probe
       (when (re-search-forward "^-" nil t)
         (forward-line 1)
         ;; Lines look like
-        ;; "      WPG* r--   Word Perfect Graphics".
-        (while (re-search-forward "^ *\\([A-Z0-9]+\\)\\*? +r" nil t)
+        ;; "      WPG* r--   Word Perfect Graphics" or
+        ;; "      WPG* WPG       r--   Word Perfect Graphics".
+        (while (re-search-forward "^ *\\([A-Z0-9]+\\)\\*?\\(?: +[A-Z0-9]+\\)? +r" nil t)
           (push (downcase (match-string 1)) formats)))
       (nreverse formats))))
 




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39994; Package emacs. Full text available.

Message received at 39994 <at> debbugs.gnu.org:


Received: (at 39994) by debbugs.gnu.org; 9 Mar 2020 09:15:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 09 05:15:15 2020
Received: from localhost ([127.0.0.1]:49799 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jBEVH-0008GI-4N
	for submit <at> debbugs.gnu.org; Mon, 09 Mar 2020 05:15:15 -0400
Received: from quimby.gnus.org ([95.216.78.240]:34712)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1jBEVF-00089n-GM
 for 39994 <at> debbugs.gnu.org; Mon, 09 Mar 2020 05:15:13 -0400
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1jBEV6-0007Wn-2I; Mon, 09 Mar 2020 10:15:06 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#39994: 27.0.90; Broken image-converter probe for imagemagick
References: <87d09mpexq.fsf@HIDDEN>
Date: Mon, 09 Mar 2020 10:15:03 +0100
In-Reply-To: <87d09mpexq.fsf@HIDDEN> (Juri Linkov's message of "Mon, 
 09 Mar 2020 02:09:05 +0200")
Message-ID: <877dztopns.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Juri Linkov <juri@HIDDEN> writes: > Then I tried
 imagemagick, 
 but image-converter said .ico format is unsupported. > Whereas running
 `convert
 -list format` outputs: > > Format Module Mode Description > [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
 0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was
 blocked.  See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
 for more information. [URIs: ingebrigtsen.no]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 39994
Cc: 39994 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Juri Linkov <juri@HIDDEN> writes:

> Then I tried imagemagick, but image-converter said .ico format is unsupported.
> Whereas running `convert -list format` outputs:
>
>    Format  Module    Mode  Description
> -------------------------------------------------------------------------------
>       ICO* ICON      rw+   Microsoft icon
>
> So this patch adds the support for the 'Module' column to imagemagick probe:

Ah, so some versions have an additional column in there?  My convert
-list format outputs:

      ICO* rw+   Microsoft icon

>  (defvar image-converter--converters
>    '((graphicsmagick :command ("gm" "convert") :probe ("-list" "format"))
> -    (ffmpeg :command "ffmpeg" :probe "-decoders")
> -    (imagemagick :command "convert" :probe ("-list" "format")))
> +    (imagemagick :command "convert" :probe ("-list" "format"))
> +    (ffmpeg :command "ffmpeg" :probe "-decoders"))
>    "List of supported image converters to try.")

Was this part included by mistake?  It changes the order the converters
are tested.

>          ;; Lines look like
>          ;; "      WPG* r--   Word Perfect Graphics".
> -        (while (re-search-forward "^ *\\([A-Z0-9]+\\)\\*? +r" nil t)
> +        (while (re-search-forward "^ *\\([A-Z0-9]+\\)\\*?\\(?: +[A-Z0-9]+\\)? +r" nil t)

Look OK to me, but the comment should be amended to reflect the two
different line formats it's now matching.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39994; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 9 Mar 2020 02:37:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 08 22:37:19 2020
Received: from localhost ([127.0.0.1]:49615 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jB8IB-000569-3Q
	for submit <at> debbugs.gnu.org; Sun, 08 Mar 2020 22:37:19 -0400
Received: from lists.gnu.org ([209.51.188.17]:60883)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1jB8I9-000560-0y
 for submit <at> debbugs.gnu.org; Sun, 08 Mar 2020 22:37:17 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:59965)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <juri@HIDDEN>) id 1jB8I7-0008I1-Og
 for bug-gnu-emacs@HIDDEN; Sun, 08 Mar 2020 22:37:16 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_NONE,
 URIBL_BLOCKED autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <juri@HIDDEN>) id 1jB8I6-00019Q-9t
 for bug-gnu-emacs@HIDDEN; Sun, 08 Mar 2020 22:37:15 -0400
Received: from bisque.elm.relay.mailchannels.net ([23.83.212.18]:37049)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <juri@HIDDEN>) id 1jB8I5-00017R-NN
 for bug-gnu-emacs@HIDDEN; Sun, 08 Mar 2020 22:37:14 -0400
X-Sender-Id: dreamhost|x-authsender|jurta@HIDDEN
Received: from relay.mailchannels.net (localhost [127.0.0.1])
 by relay.mailchannels.net (Postfix) with ESMTP id 3F1E1500924
 for <bug-gnu-emacs@HIDDEN>; Mon,  9 Mar 2020 00:13:47 +0000 (UTC)
Received: from pdx1-sub0-mail-a88.g.dreamhost.com
 (100-96-215-21.trex.outbound.svc.cluster.local [100.96.215.21])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id BAD12501308
 for <bug-gnu-emacs@HIDDEN>; Mon,  9 Mar 2020 00:13:46 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|jurta@HIDDEN
Received: from pdx1-sub0-mail-a88.g.dreamhost.com ([TEMPUNAVAIL].
 [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384)
 by 0.0.0.0:2500 (trex/5.18.5); Mon, 09 Mar 2020 00:13:47 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|jurta@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Supply-Wide-Eyed: 1fe4c6cf36c225ca_1583712826978_2185432260
X-MC-Loop-Signature: 1583712826978:3686955420
X-MC-Ingress-Time: 1583712826978
Received: from pdx1-sub0-mail-a88.g.dreamhost.com (localhost [127.0.0.1])
 by pdx1-sub0-mail-a88.g.dreamhost.com (Postfix) with ESMTP id 99F33B1FDC
 for <bug-gnu-emacs@HIDDEN>; Sun,  8 Mar 2020 17:13:43 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to
 :subject:date:message-id:mime-version:content-type; s=
 linkov.net; bh=gCGdnDCuGz8Qo8i9jB4LV3glmII=; b=pET/MHngoZsrb1sGm
 UebH/bapbknkmzWCdiolQpAVIB1oKXbvv7VBW8ZKsVWqQKnKEC1bOpp7gnKYWlSk
 J8C1aVRnT+zOSDtX4RIIPggckyqUG3G6UrDEh1TZ7sbjQjvbdaV7gv++Fk8JYDex
 p1+3FqffNckoODEC0tbCbKOziY=
Received: from mail.jurta.org (m91-129-103-27.cust.tele2.ee [91.129.103.27])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 (Authenticated sender: jurta@HIDDEN)
 by pdx1-sub0-mail-a88.g.dreamhost.com (Postfix) with ESMTPSA id 6A899B1FD6
 for <bug-gnu-emacs@HIDDEN>; Sun,  8 Mar 2020 17:13:41 -0700 (PDT)
X-DH-BACKEND: pdx1-sub0-mail-a88
From: Juri Linkov <juri@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 27.0.90; Broken image-converter probe for imagemagick
Organization: LINKOV.NET
Date: Mon, 09 Mar 2020 02:09:05 +0200
Message-ID: <87d09mpexq.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-VR-OUT-STATUS: OK
X-VR-OUT-SCORE: 0
X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedugedruddujedgudekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvffuohffkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtfedrvdejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdefrddvjedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopegsuhhgqdhgnhhuqdgvmhgrtghssehgnhhurdhorhhg
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-Received-From: 23.83.212.18
X-Spam-Score: 0.2 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.8 (/)

Tags: patch

I tried to visit an .ico file using graphicsmagick image-converter,
but it failed with the error:

  Cannot display image: (/usr/bin/gm convert: Unexpected end-of-file ().

Probably a bug in graphicsmagick, so we can do nothing to fix this.

Then I tried imagemagick, but image-converter said .ico format is unsupported.
Whereas running `convert -list format` outputs:

   Format  Module    Mode  Description
-------------------------------------------------------------------------------
      ICO* ICON      rw+   Microsoft icon

So this patch adds the support for the 'Module' column to imagemagick probe:

diff --git a/lisp/image/image-converter.el b/lisp/image/image-converter.el
index 0488a13d41..5843b2a399 100644
--- a/lisp/image/image-converter.el
+++ b/lisp/image/image-converter.el
@@ -44,8 +44,8 @@ image-converter-regexp
 
 (defvar image-converter--converters
   '((graphicsmagick :command ("gm" "convert") :probe ("-list" "format"))
-    (ffmpeg :command "ffmpeg" :probe "-decoders")
-    (imagemagick :command "convert" :probe ("-list" "format")))
+    (imagemagick :command "convert" :probe ("-list" "format"))
+    (ffmpeg :command "ffmpeg" :probe "-decoders"))
   "List of supported image converters to try.")
 
 (defun image-convert-p (source &optional data-p)
@@ -150,7 +150,7 @@ image-converter--probe
         (forward-line 1)
         ;; Lines look like
         ;; "      WPG* r--   Word Perfect Graphics".
-        (while (re-search-forward "^ *\\([A-Z0-9]+\\)\\*? +r" nil t)
+        (while (re-search-forward "^ *\\([A-Z0-9]+\\)\\*?\\(?: +[A-Z0-9]+\\)? +r" nil t)
           (push (downcase (match-string 1)) formats)))
       (nreverse formats))))
 




Acknowledgement sent to Juri Linkov <juri@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#39994; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 16 Mar 2020 00:45:02 UTC

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