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: Wed, 09 Oct 2019 15:53:04 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>> I still can't see why we should care about our ability to display an
>> image before preferring image-mode over fundamental-mode.
> It just feels odd to be mapping file extensions to a mode when we don't
> know whether that mode can display the file meaningfully or not.

If the result is no worse than what we have in fundamental-mode, I think
it's good.  It's likely going to be better: image-mode could emit
a helpful message explaining which variable to set to enable the use of
external converters or which external converters to install to be able
to display the image, for example.

> We don't do that with other file types, so why with images?

We use `perl-mode` even if there's no `perl` installed ;-)

>> - extensions which are always images and can't meaningfully be edited
>>   within Emacs, so only image-mode makes sense.
>
> In that case we should change image-mode to not display stuff like this
> for formats it doesn't understand:
>
> Type C-c C-c or C-c C-x to view the image as an image or hex.
> Cannot display image: (Cannot determine image type)

Yes, we could improve that.
But it's still no worse than the silent treatment of fundamental-mode.


        Stefan




reply via email to

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