<<< Date Index >>>     <<< Thread Index >>>

Tagging threads containing messages that match a pattern



We're thinking of keeping some records in a sort of email database where
updates to the records would be sent as replies to the emails. One of
the things we'll want to do sometimes is search for each record (i.e.,
thread) that matches certain criteria; e.g., each thread corresponds to
a single hardware item--we want to know which items/threads have emails
containing 'type: computer', 'os: debian' and 'mail-client-installed:
mutt'. Note that it is not necessarily the case that all lines are found
in the same email, just in the same thread.

I was thinking that this would be fairly straightforward: tag all emails
that match the first pattern, use the tag-prefix function to tag-thread
all tagged emails, then limit to tagged messages. Do the same thing for
the next criterion, and so on. When you're done, you have all and only
those threads that match all the conditions. But if I do tag-prefix (';'
on my setup) and then 'tag-thread' ('t' on my setup), it *doesn't* tag the
threads of the tagged emails--it tags whatever thread I happen to be on.
I suppose this may be because if there were multiple items in a thread
it would toggle tagging and untagging the thread and the results would
be unpredictable? Anyway, anyone got any ideas how to do the above?

P.S. I know using some other database setup would be an option, but I'd
rather use mutt ;). Can anyone think of any other cool things mutt could
do with a setup like this--such as 'digesting' a thread (taking all
messages in a thread and constructing a single email out of them... say,
I think you can do that by tagging the thread and then forwarding... then
you could just search the forwarded messages for occurences of all three
patterns... kind of clunky, but it might work...).

Anyway, TIA.
-- 
Daniel Teichert
danielt@xxxxxxxxxx