mime apps specification

Jerome Leclanche adys.wh at gmail.com
Sun Apr 13 13:32:04 PDT 2014

On Sun, Apr 13, 2014 at 9:29 PM, Vladimir Kudrya <vladimir-csp at yandex.ru> wrote:
> On 14.04.2014 00:20, Jerome Leclanche wrote:
>> On Sun, Apr 13, 2014 at 9:15 PM, Vladimir Kudrya <vladimir-csp at yandex.ru>
>> wrote:
>>> On 13.04.2014 21:54, Jerome Leclanche wrote:
>>> Reading local first, you will find the foo.desktop file *before* you
>>> arrive to the item in the global blacklist.
>>> That is if you just need to find the default. And IF [Default
>>> Application]
>>> for the type even exists in the hierarchy.
>>> How to get whole list of associations of given mime type then? Spec says
>>> to
>>> iterate from local to global, concatenate [Added] and [Removed]
>>> separately,
>>> then use all [Added] minus [Removed] as blacklist. This means that local
>>> [Added] does not override global [Removed].
>> You proceed the same way for every kind of item you want, adding items
>> to the blacklist ([Removed]) as you go along. You exclude items from
>> ever being added to the list if they are blacklisted; this avoids
>> dealing with blacklist priorities separately.
>> J. Leclanche
> So if generic mimeapps.list removes an item, and $desktop-mimeapps.list adds
> it, it still remains removed, despite $desktop-mimeapps.list has precedence
> as more local? Why not just to follow simple rule: downstream overrides?

That *is* the rule, downstream always overrides. You calculate the
list on each step while adding items to the blacklist as you find them
*from most local to most global*.

I'm not really sure how to make it more clear. David made sure the
wording of the algorithm was easy to follow.

J. Leclanche

More information about the xdg mailing list