Mimetype Activation (Was: Shared mimetypes + activation)
Alexander Larsson
alexl at redhat.com
Sat May 1 02:29:27 EEST 2004
On Fri, 2004-04-30 at 17:44, Jonathan Blandford wrote:
> Alexander Larsson <alexl at redhat.com> writes:
>
> > Another important thing to keep in mind here is mime aliases. If we e.g.
> > add a mime type for .php files (say text/x-phpsrc) suddenly all *.php
> > files are of that type, and an editor registered to handle text/plain
> > won't be used to open it. So, we need some sort of aliases, allowing you
> > to have a specific default handler for text/x-phpsrc, but if none
> > exists, we use the one for text/plain. And the list of all apps handling
> > the file should contain both the text/plain and the text/x-phpsrc
> > handlers.
>
> I don't know if this really belongs in the spec. Does this mean that we
> have to add a link to all 67 text/* mime types just to get them to be
> opened by a text editor? This seems more an instance of text/plain
> being special -- there's not really an equivalent for any of the other
> domains (image, audio, application etc.) It's basically expected that a
> text editor can open any other text file, while an image program only
> can open images that it knows about.
>
> Given that, we have some other options:
>
> * Treat text/plain as special, and have the various desktops assume
> that applications that support text/plain also support text/*.
But our mime database has text files in application/, like
"application/x-shellscript". If we decide to handle it this way we could
fix that though.
> * Do nothing, but make applications register themselves. As an
> example, gedit has syntax highlighting for a bunch of file types.
> Registering it as handling those, as well as text/plain would catch a
> large chunk files. That then leaves the user only associating those
> few file types that he runs across with the application.
This breaks apps when we later add mimetypes though.
> Thoughts?
I guess we could special-case text. I can't think of a similar case off
the top of my head. (Although its somewhat related to the zip/gzip/xml
problem).
More information about the xdg
mailing list