From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#39994: 27.0.90; Broken image-converter probe for imagemagick Date: Tue, 10 Mar 2020 00:43:44 +0200 Organization: LINKOV.NET Message-ID: <87mu8p9mjj.fsf@mail.linkov.net> References: <87d09mpexq.fsf@mail.linkov.net> <877dztopns.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="48142"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: 39994@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Mar 09 23:59:48 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jBRNC-000CPU-ES for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 09 Mar 2020 23:59:46 +0100 Original-Received: from localhost ([::1]:51010 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jBRNB-0000Yf-Hj for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 09 Mar 2020 18:59:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51744) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jBRMW-00006O-QO for bug-gnu-emacs@gnu.org; Mon, 09 Mar 2020 18:59:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jBRMU-00068s-P2 for bug-gnu-emacs@gnu.org; Mon, 09 Mar 2020 18:59:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45638) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jBRMU-00068l-LX for bug-gnu-emacs@gnu.org; Mon, 09 Mar 2020 18:59:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jBRMU-0002rj-Lw for bug-gnu-emacs@gnu.org; Mon, 09 Mar 2020 18:59:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 09 Mar 2020 22:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39994 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 39994-submit@debbugs.gnu.org id=B39994.158379472210955 (code B ref 39994); Mon, 09 Mar 2020 22:59:02 +0000 Original-Received: (at 39994) by debbugs.gnu.org; 9 Mar 2020 22:58:42 +0000 Original-Received: from localhost ([127.0.0.1]:51606 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jBRM9-0002qd-P9 for submit@debbugs.gnu.org; Mon, 09 Mar 2020 18:58:42 -0400 Original-Received: from azure.elm.relay.mailchannels.net ([23.83.212.7]:10814) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jBRM6-0002qG-Sl for 39994@debbugs.gnu.org; Mon, 09 Mar 2020 18:58:40 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-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) Original-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@jurta.org Original-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@jurta.org X-MailChannels-Auth-Id: dreamhost X-Coil-Bitter: 6fa0ac7b48364672_1583794715913_353905955 X-MC-Loop-Signature: 1583794715913:918981403 X-MC-Ingress-Time: 1583794715912 Original-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= Original-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@jurta.org) 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 In-Reply-To: <877dztopns.fsf@gnus.org> (Lars Ingebrigtsen's message of "Mon, 09 Mar 2020 10:15:03 +0100") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedugedrudduledgtdefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdefrddvjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtfedrvdejpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheplhgrrhhsihesghhnuhhsrdhorhhg 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: 209.51.188.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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:177114 Archived-At: >> 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))))