Exclude patterns in beagle-settings



Hi,
	Most you are aware of "exclude patterns" in beagle config (set via 
beagle-config or beagle-settings). Files matching these patterns are not 
indexed.
	I noticed that the "exclude" patterns are not regular expressions but simple 
patterns like ".*", "*.tmp", "*.o", "config.log". The equivalent regular 
expressions for these would be "\..*", ".*\.tmp", ".*\.o", "config\.log". The 
current values are easy to understand but are limited in power (e.g. if you 
read the source you will see that "*akefile.*" won't mean what you want and 
there are more).
	I was wondering if we should instead use regular expressions ? The only 
problem with regexes is that they are harder to parse and even simple 
patterns can result in a complicated regexes. What do you think ?
	One option is use regexes as the underlying values but ask the user to input 
simple patterns in the GUI and translate them to equivalent regexes when 
storing them. Then we also have to provide an advanced input box for the 
regex-friendly advanced users :). The whole things gets messy. This is on top 
of the fact that beagle-settings has not received any attention lately.

- dBera

PS: Regexes are in general slower, but in this particular case speed won't be 
a problem.

-- 
-----------------------------------------------------
Debajyoti Bera @ http://dtecht.blogspot.com
beagle / KDE fan
Mandriva / Inspiron-1100 user


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