From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Image-conversion shims Date: Sun, 06 Oct 2019 23:58:38 +0300 Organization: LINKOV.NET Message-ID: <87muedrg7d.fsf@mail.linkov.net> References: <87v9tctcca.fsf@gnus.org> <87impct2xf.fsf@gnus.org> <83zhinfufb.fsf@gnu.org> <87ftkfnx7a.fsf@gnus.org> <83eezzfh8c.fsf@gnu.org> <8736gea0do.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="58570"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: Eli Zaretskii , monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 06 23:12:04 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iHDoy-000F8V-NS for ged-emacs-devel@m.gmane.org; Sun, 06 Oct 2019 23:12:04 +0200 Original-Received: from localhost ([::1]:37040 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iHDox-0005qP-6Q for ged-emacs-devel@m.gmane.org; Sun, 06 Oct 2019 17:12:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39153) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iHDo6-0005q5-Vi for emacs-devel@gnu.org; Sun, 06 Oct 2019 17:11:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iHDo5-00062g-Vo for emacs-devel@gnu.org; Sun, 06 Oct 2019 17:11:10 -0400 Original-Received: from bongo.elm.relay.mailchannels.net ([23.83.212.21]:49936) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iHDo4-000612-BZ; Sun, 06 Oct 2019 17:11:08 -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 5374550115E; Sun, 6 Oct 2019 21:11:06 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a93.g.dreamhost.com (100-96-15-102.trex.outbound.svc.cluster.local [100.96.15.102]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id D24575012FF; Sun, 6 Oct 2019 21:11:05 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a93.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.3); Sun, 06 Oct 2019 21:11:06 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Suffer-Spicy: 540afe3f5fd9901d_1570396266123_1170362496 X-MC-Loop-Signature: 1570396266123:1906689430 X-MC-Ingress-Time: 1570396266123 Original-Received: from pdx1-sub0-mail-a93.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a93.g.dreamhost.com (Postfix) with ESMTP id 04BC980F54; Sun, 6 Oct 2019 14:11:02 -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=cvIXuRCvLJnPI7hZ8jSAFjTDsUk=; b= fDko6Yvt0iA6tOBLiNfvdp76z1hhWoVf3Iytsueq2J3Sa2cJ1IYOwE+ZtCgK+O27 ZW1KE90W0KJ7/a8HvEv3W9M3Wv+nBuZIHHVwN5IdXzp2YcOwyoYd56hzSh0zIyZ5 4Pinu06TvPQRFpf/i5PXuySgkbwiW7P/NfiL7JF1MBo= Original-Received: from mail.jurta.org (m91-129-99-99.cust.tele2.ee [91.129.99.99]) (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-a93.g.dreamhost.com (Postfix) with ESMTPSA id 3BCED80F73; Sun, 6 Oct 2019 14:10:58 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a93 In-Reply-To: <8736gea0do.fsf@gnus.org> (Lars Ingebrigtsen's message of "Mon, 30 Sep 2019 06:12:03 +0200") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedufedrheehgdduiedvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrdelledrleelnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledrleelrdelledprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehlrghrshhisehgnhhushdrohhrghenucevlhhushhtvghrufhiiigvpedt X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 23.83.212.21 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:240677 Archived-At: > I.e., we want ("*.webp" . image-mode) in auto-mode-alist, but we can't > put it there before we've called "gm convert -list format", and we don't > do that until we call `create-image' with image-use-external-converter > non-nil, which won't be called since we don't have a mapping from > "*.webp" to image-mode. > > Very chicken and egg. > > Hm... One possibility would be to do away with > > (setq image-use-external-converter t) > > as a user-level thing, and instead tell them to do > > (image-external-converter-mode) > > in ~/.emacs, which would do the probing and then altering > auto-mode-alist. Hm. Perhaps that's a pretty clean idea? Hm... I > think so. Except that switching the mode off would have to remove the > entries from auto-mode-alist again, which sounds slightly destructive. We already have a working solution with imagemagick-register-types, imagemagick-types-inhibit, imagemagick-enabled-types, and all related code. Customization should be no different when images are handled via a process instead of using a linked library.