Shared Mime spec: overriding globs locally
Alexander Larsson
alexl at redhat.com
Thu Mar 26 03:36:12 PDT 2009
On Thu, 2009-03-26 at 11:30 +0100, David Faure wrote:
> 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.
Are there really much code changes required?
We need some stuff in the xml parser that converts the deleteall nodes
to some "magic-value" rules.
Then we need to check for these magic values when reading the files.
I guess I can do that, shouldn't be to much work.
More information about the xdg
mailing list