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: Mon, 16 Mar 2020 02:04:58 +0200 Organization: LINKOV.NET Message-ID: <87v9n5cggl.fsf@mail.linkov.net> References: <87d09mpexq.fsf@mail.linkov.net> <877dztopns.fsf@gnus.org> <87mu8p9mjj.fsf@mail.linkov.net> <87fteb16x0.fsf@gnus.org> <87wo7ma3n7.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="4513"; 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 16 02:02:22 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 1jDe98-00015N-Fg for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 16 Mar 2020 02:02:22 +0100 Original-Received: from localhost ([::1]:60968 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jDe97-0003Wr-5j for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 15 Mar 2020 21:02:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38876) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jDdhk-0007so-N2 for bug-gnu-emacs@gnu.org; Sun, 15 Mar 2020 20:34:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jDdhj-0008Ij-Dz for bug-gnu-emacs@gnu.org; Sun, 15 Mar 2020 20:34:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58111) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jDdhj-0008Gi-7D for bug-gnu-emacs@gnu.org; Sun, 15 Mar 2020 20:34:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jDdhj-0005cC-0i for bug-gnu-emacs@gnu.org; Sun, 15 Mar 2020 20:34:03 -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, 16 Mar 2020 00:34: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 fixed Original-Received: via spool by 39994-submit@debbugs.gnu.org id=B39994.158431880421486 (code B ref 39994); Mon, 16 Mar 2020 00:34:02 +0000 Original-Received: (at 39994) by debbugs.gnu.org; 16 Mar 2020 00:33:24 +0000 Original-Received: from localhost ([127.0.0.1]:35843 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jDdh5-0005aT-Pk for submit@debbugs.gnu.org; Sun, 15 Mar 2020 20:33:24 -0400 Original-Received: from caracal.birch.relay.mailchannels.net ([23.83.209.30]:41070) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jDdh4-0005aH-5P; Sun, 15 Mar 2020 20:33:22 -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 DBA08340188; Mon, 16 Mar 2020 00:33:20 +0000 (UTC) Original-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@jurta.org Original-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@jurta.org X-MailChannels-Auth-Id: dreamhost X-Company-Troubled: 69385cd80143c546_1584318800640_1988119362 X-MC-Loop-Signature: 1584318800640:643092728 X-MC-Ingress-Time: 1584318800639 Original-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= Original-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@jurta.org) 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 In-Reply-To: <87wo7ma3n7.fsf@mail.linkov.net> (Juri Linkov's message of "Sun, 15 Mar 2020 02:00:12 +0200") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedugedrudefuddgleduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdejrdeiheenucevlhhushhtvghrufhiiigvpeefnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtjedrieehpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheplhgrrhhsihesghhnuhhsrdhorhhg 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:177398 Archived-At: 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))