mimeapps.list and mimetype inheritance

David Faure faure at kde.org
Wed Dec 26 11:31:55 PST 2012


Hi Alexander,

When you implemented support for mimeapps.list in glib, did that include 
looking up inherited mimetypes, or is that not supported?

Here's an example.
emacs.desktop says:
   MimeType=text/plain;text/x-csrc;
My mimeapps.list says:
   text/plain=kde4-kate.desktop;emacs.desktop;
  (and has no entry for text/x-csrc)

When opening a text/plain file, kate is selected, no problem.
But when opening a text/x-csrc file, emacs is selected.
Is this expected?

The question is: should the user's preference for text/plain have priority 
over the fact that a .desktop file mentions the derived mimetype explicitely?
As a user, I would expect that (so that I can select a text editor for all 
inherited mimetypes in one click).
But implementation-wise, this is a bit tricky, because of the interaction with 
multiple dirs in XDG_DATA_DIRS, and with "Removed Associations", so I was 
wondering if this was implemented in glib, and if so, whether we could agree 
on a common algorithm.

The spec [1] doesn't currently mention mimetype inheritance.

[1] http://www.freedesktop.org/wiki/Specifications/mime-actions-spec

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE, in particular KDE Frameworks 5



More information about the xdg mailing list