Open Bug 482397 Opened 15 years ago Updated 2 years ago

add regexp/wildcard to saved search scopes, like "*/Inbox" to span Inboxes, */Archives/* to span all archive folders

Categories

(Thunderbird :: Search, enhancement)

enhancement

Tracking

(Not tracked)

People

(Reporter: Bienvenu, Assigned: Bienvenu)

References

Details

In order to do saved searches across things like all Inboxes/Sent/Archives, etc, it would be really useful to have search scopes that have regexps or wildcards in them - this would allow us to have scopes like "*/Inbox" to span Inboxes, or */Archives/* to span all archives and sub-folders of archives. I would store the regexps in virtualfolders.dat, and when that file is loaded, evaluate all the folders against that regexp to calculate the scope for the saved search. We'd also want to have a listener for folder creation/deletion and check the regexp to see if new folders need to be added to a saved search scope, or deleted folders removed from a saved search scope.
Flags: blocking-thunderbird3+
This feels like a lot of duplication of gloda-backed searches, no?
As an alternate approach, for each saved search you could store a property which is the root folder for the search. On that root folder, set another property which indicates that the search is enabled for that root folder. Then when you open the search, check that folder and all of its subfolders for the inherited property of whether the search is enabled. Then you could precisely remove individual folders and their subfolders from the search.

That is more powerful than the *, and more understandable to the average user than the regular expression.

(In reply to comment #1)
> This feels like a lot of duplication of gloda-backed searches, no?

You guys really need to resolve this architectural question which has existed every since gloda was envisioned.
(In reply to comment #1)
> This feels like a lot of duplication of gloda-backed searches, no?

It may be a step on a slippery slope that already exists, but it's just a small extension to the existing scope mechanism we already have for saved searches.

Re Kent's comments, I don't expect this to ever be exposed to users. These scopes are things that code like the blocked bug 305340 will generate. Also, your suggestion doesn't deal nicely with doing things like handling all Inboxes, which is specifically what I need this for.
OS: Windows XP → All
Hardware: x86 → All
This is no longer blocking, since I did smart folders in a different way...
Flags: blocking-thunderbird3+
Target Milestone: Thunderbird 3.0b3 → ---
Severity: normal → enhancement
Component: Mail Window Front End → Search
Summary: add some sort of regexp/wildcard to saved search scopes → add regexp/wildcard to saved search scopes, like "*/Inbox" to span Inboxes, */Archives/* to span all archives
Summary: add regexp/wildcard to saved search scopes, like "*/Inbox" to span Inboxes, */Archives/* to span all archives → add regexp/wildcard to saved search scopes, like "*/Inbox" to span Inboxes, */Archives/* to span all archive folders
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.