emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Image-conversion shims


From: Stefan Monnier
Subject: Re: Image-conversion shims
Date: Tue, 08 Oct 2019 13:47:58 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]