From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Image-conversion shims Date: Tue, 08 Oct 2019 13:47:58 -0400 Message-ID: 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> <87muedrg7d.fsf@mail.linkov.net> <878spxe3hb.fsf@gnus.org> <87k19gwfwb.fsf@mail.linkov.net> <87h84j1asf.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="119306"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Eli Zaretskii , emacs-devel@gnu.org, Juri Linkov To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 08 19:59:07 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 1iHtlK-000Urb-0E for ged-emacs-devel@m.gmane.org; Tue, 08 Oct 2019 19:59:06 +0200 Original-Received: from localhost ([::1]:59626 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iHtlI-00088g-Rk for ged-emacs-devel@m.gmane.org; Tue, 08 Oct 2019 13:59:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53204) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iHtam-0000fN-Cf for emacs-devel@gnu.org; Tue, 08 Oct 2019 13:48:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iHtak-0005EP-VR for emacs-devel@gnu.org; Tue, 08 Oct 2019 13:48:11 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:52971) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iHtae-00057x-5W; Tue, 08 Oct 2019 13:48:04 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 90830100F0B; Tue, 8 Oct 2019 13:48:01 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id DB345100C41; Tue, 8 Oct 2019 13:47:59 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1570556879; bh=t+JYL9a6ZJNE1iI96oJqFEg2z0/JGlHIqykyPkAgVNU=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=mqBOTZdDxdVAFxUNwamGjRcDKQRjv3FK4qaspE7eFTxtuR0ys1RltanyNsmO/blox 3nkk3qbpgEjykgosQ0lZOdK/fRklh8skGgf0k1ukKlu+SHkw/xAqvQ6yNcBi5mkBLT IhvXbWYntRyVq8dupmpL+SUsCvnPGTkjrFzy9INb5DOxLMMNwP/YXjwfHVWTPEKHx2 lhf0CLV6u7fuLMDgwJokYimdylGBHALg6psol0UMjp2SyHQcBm6q7xQyalJW8joVwg tkY4IM/+U4bjYERudsNV4FmGFA7fVXSxY9lfX52ZDCjaHQA0ocxoG8GFDtyZbTGVaF PqVjXIAlmG6eA== Original-Received: from alfajor (modemcable157.163-203-24.mc.videotron.ca [24.203.163.157]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id A10381205E0; Tue, 8 Oct 2019 13:47:59 -0400 (EDT) In-Reply-To: <87h84j1asf.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 08 Oct 2019 18:06:56 +0200") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 132.204.25.50 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:240758 Archived-At: >> After customizing imagemagick-enabled-types to t, it registers all image >> types; image-converter could do the same. This is a good trade-off to >> not register all exotic formats in auto-mode-alist by default, >> but still easy to customize to stuff everything to auto-mode-alist >> when needed. I still can't see why we should care about our ability to display an image before preferring image-mode over fundamental-mode. IOW, I think the auto-mode-alist entries should be added statically not based on what we can do with them, but based on what the extension means in practice. Typically, there are various cases: - things like .svg and .xpm which can be meaningfully viewed as "an image" or as "a text file". There, we should make sure the user can switch between those two views (and default to text if we can't display the image, e.g. via image-mode-maybe). - extensions which are sometimes used for images and sometimes for completely unrelated purposes. We should decide based on which is most likely to the case. - extensions which are always images and can't meaningfully be edited within Emacs, so only image-mode makes sense. Stefan