[Top][All Lists]

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

Re: Image-conversion shims

From: Eli Zaretskii
Subject: Re: Image-conversion shims
Date: Tue, 01 Oct 2019 15:36:41 +0300

> From: Lars Ingebrigtsen <address@hidden>
> Cc: address@hidden,  address@hidden
> Date: Tue, 01 Oct 2019 14:06:55 +0200
> > I thought when image-mode is invoked, the external converter is called
> > automagically, no?
> The user may not have any of the required external converters installed.

In which case they will get an error message, as in the case when they
try visiting a PNG image without libpng compiled in.

> I'm concerned about three things: 1) Long-time maintenance of all
> these auto-mode-alist mapping

I don't think this is a problem, we maintain auto-mode-alist all the

> 2) the less-than ideal user experience of
> being presented with image-mode and an error instead of a
> fundamental-mode buffer as today

Why would a user want Fundamental mode for an image?

> 3) possibly stomping on a user's own addition to auto-mode-alist (if
> the user adds mapping to the end of the alist).

Wouldn't user customizations override the default value?  I think they
would, and then this is not a problem.

> Because the list of formats covered by these converters is huge, and
> putting all of these into the default auto-mode-alist would be a
> problem.

Some of the formats are already supported ("svg", "png", "xpm", etc.),
so they shouldn't be added again; others seem inappropriate or
irrelevant ("http", "file", "ftp", etc.).  As for the length of the
list, I don't think we should worry: the default auto-mode-alist has
188 elements in Emacs 27, so a couple dozen more cannot do much harm,
I think.

reply via email to

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