Shared Mime spec: overriding globs locally

Alexander Larsson alexl at
Thu Mar 26 03:17:12 PDT 2009

On Wed, 2009-03-25 at 23:50 +0100, David Faure wrote:
> On Wednesday 25 March 2009, Alexander Larsson wrote:

> > > OK, great.  So, <magic deleteall="true"/> ? But we also need a way to express that
> > > in the generated binary "magic" file. Well, maybe just [90:image/x-eps] is enough
> > > (an empty group).
> > 
> > Similar to the above, I think it would be nice to be able to mark when
> > to override or not so you can either add to or replace the global magic.
> That's more tricky then, syntax-wise.
> [90:image/x-eps:__NOMAGIC__] ??

I don't think that is right. It would create a weird mimetype in old
parsers not handling this, and the new magic would apply to that only.

Can't we use a special magic value for this too?
So, something like:

<new magic rules>

If something doesn't support this new feature we will instead add the
new rules, plus get a new __NOMAGIC__ rule which is unlikely to match

More information about the xdg mailing list