From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Image-conversion shims Date: Sun, 29 Sep 2019 10:11:52 +0300 Message-ID: <83zhinfufb.fsf@gnu.org> References: <87v9tctcca.fsf@gnus.org> <87impct2xf.fsf@gnus.org> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="86628"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 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 Sep 29 09:12:10 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 1iETNK-000MRs-Hq for ged-emacs-devel@m.gmane.org; Sun, 29 Sep 2019 09:12:10 +0200 Original-Received: from localhost ([::1]:37178 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iETNJ-0005ZM-Go for ged-emacs-devel@m.gmane.org; Sun, 29 Sep 2019 03:12:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53642) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iETNA-0005Z6-67 for emacs-devel@gnu.org; Sun, 29 Sep 2019 03:12:01 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:45053) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iETN9-0003ec-Qk; Sun, 29 Sep 2019 03:11:59 -0400 Original-Received: from [176.228.60.248] (port=1813 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iETN9-0004BE-Au; Sun, 29 Sep 2019 03:11:59 -0400 In-reply-to: <87impct2xf.fsf@gnus.org> (message from Lars Ingebrigtsen on Sun, 29 Sep 2019 01:29:48 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:240385 Archived-At: > From: Lars Ingebrigtsen > Date: Sun, 29 Sep 2019 01:29:48 +0200 > Cc: emacs-devel@gnu.org > > Stefan Monnier writes: > > > Go for it. > > I went for it. Thanks. > (setq convert-images-externally t) That variable's name should start with "image-", IMO, and the same for the (confusingly similar) convert-external-images. It should also be documented in the user manual (I'd simply move what you wrote for the ELisp manual to the user manual, since I see no reason to document this in the former). When looking for an installed converter, shouldn't we put ImageMagick last? I also think that using call-process for invoking the converter makes the feature less flexible and more "tricky" to maintain. Already you needed to jump through some hoops to support "gm convert". I think using shell-command would have made all this much simpler and more straightforward. > It doesn't work in image-mode yet, because I was unsure at what point to > hook the auto-mode stuff together with this stuff. It's slightly > chicken and egg -- convert-images-externally isn't consulted before we > try to display an image, and it will then compute what image suffixes it > can handle. > > But if that hasn't been computed, then image-mode won't be triggered, > and so create-image won't be called. Maybe we need a new hook?