[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnu-arch-users] Re: Efficiently find out if <file> is source or not

From: Stefan Monnier
Subject: [Gnu-arch-users] Re: Efficiently find out if <file> is source or not
Date: 14 Mar 2004 21:09:48 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

> You would need to (a) parse {arch}=tagging-method; (b) make sure it
> matches the source regexp and not the unrecognised one; (c) depending
> on the tagging method, look for an arch-tag: in the file, or a
> .arch-ids/$, or whatever.

That's pretty damn nasty since you have to be extra careful to match
regexes in the same order as tla, and not to forget to check every
.arch-inventory file on the way to the file you're checking, and you have
to make sure you're using the same regex rules (in my case I'm writing this
in Emacs Lisp where the regexps are different), ...

> A quick and nasty method would be to do only the last check, I
> suppose.

That's what I'm reluctantly trying to use instead, but that's not
very satisfactory.  I want a reliable answer, not some approximation.

> | The only way I could come up with is to do something akin to:
> |     tla inventory -s `dirname $file` | grep $file
> | but this can take a long time.

> It's guaranteed to work the same way as tla does though :-)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]