Shared Mime spec: overriding globs locally

David Faure faure at kde.org
Thu Mar 26 03:30:16 PDT 2009


On Thursday 26 March 2009, Alexander Larsson wrote:
> 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:
> 
> [90:image/x-eps]
> >0=__NOMAGIC__
> <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
> anything.

Yep, sounds great.

What's the next step? I can provide a patch for the spec, but I have to rely on you
guys to do the code changes.

-- 
David Faure, faure at kde.org, sponsored by Qt Software @ Nokia to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).


More information about the xdg mailing list