Hi, I've been getting gradually more annoyed with the way my mail archives are organised recently, and, after playing with Evolution a little bit, got to thinking that vFolders might be the answer. So, I've been trying to figure out some way of doing the same sort of thing in mutt.
First, has anyone done this before? Is there a FAQ or HOWTO I could be reading? What I'm thinking is basically having a huge morass of mail shoved in a directory somewhere, with a fancy index. Whenever I want to look at mail in there, I construct a query ("Show me all mail with [EMAIL PROTECTED] in the From/To/Cc headers" or "Show me all mail with message-id blah") and then have mutt show me all the mail that matches that query as a "virtual folder". The easiest way to do this seems like it'd be to write a script which does the query and constructs a mailbox in Maildir format with all the appropriate messages in it, then have mutt look at that Maildir. That much I can do. What I can't figure out is how to run that script and make mutt look at the output in a reasonably effective way. What I'd _like_ is to be able to write a macro that asks me: "What email address:" then runs <change-folder>`/home/aj/mail/bin/query-by-addr "$result"`. (I'd like to be able to have a few mutts doing queries at the same time, so the folder name needs to be determined somewhat dynamically to avoid clashes. I can't figure out how to do that with a macro either) I could avoid the prompting by having my script do that, but I can't figure out any way to have a macro change to a dynamically-determined folder. What would be ideal would be to have some sort of "user variable" that could be set, and some way of making a macro give a prompt then set one of those "user variables". Then I could say: macro index Q["What email address:",email] \ :set user_foldername=`query-by-addr "$email"`<enter> \ <change-folder><$foldername><enter> or something similar. But I can't do that, and I'm stumped as to what else I can do. Any ideas? Cheers, aj -- Anthony Towns <[EMAIL PROTECTED]> <http://azure.humbug.org.au/~aj/> I don't speak for anyone save myself. GPG signed mail preferred. ``BAM! Science triumphs again!'' -- http://www.angryflower.com/vegeta.gif
msg28213/pgp00000.pgp
Description: PGP signature