Friday March 03, 2006 at 05:21
Subject: Mutt virtual folders.
Keywords:
E-mail
Posted by: Sean Reifschneider
Recently I was reading about one of the other e-mail software packages
which had the idea of virtual folders. The idea was that you could have
something that acted like an e-mail folder, but was based on search results
or other types of mappings. I was thinking that this would be a nice
feature, but then I realized that mutt already has this functionality, I
just wasn't using it.
In mutt there is the "limit" command, by default mapped to "l". Mutt
will then ask for a pattern to limit the view by. The result is that your
message list only shows the messages that match the pattern. Normally my
mailbox hovers between 20 and 100 messages, and I find this useful to zero
in on messages related to a particular task.
Another case I find this very useful for is when I'm looking in either
my archive of sent or received messages. In the past I would use the
search function in mutt (bound to "/") to try to find messages. However,
in a month I may have over 6,000 messages in my incoming archive and over
600 in my sent archive. Jumping from one message to another requires that
I filter out the surrounding messages which usually aren't related to what
I'm looking for. Using a limit here, I will usually limit it based on
sender or recipient so that I can more quickly locate the needle in the
haystack.
The patterns you can specify are quite rich, allowing limits based on
the subject, sender or recipient, arbitrary headers or even the whole body.
You can also limit based on date ranges, messages containing PGP keys,
mailing list messages, new or old messages, messages that have been replied
to or messages that have or have not been read, etc... Where appropriate,
these can match regular expressions.
These patterns can also be grouped and combined with AND, OR, and NOT
operations to become very powerful indeed. For example, you could create a
view of messages 1 to 2 weeks old that are are less than 100KB in size and
were sent to or from user@example.com by using the pattern "~d 1w-2w ~z
<100000 (~f user@example.com | ~t user@example.com)"
In the above, the tilde (~) followed by a letter specifies a pattern
type, where "~d" matches a date, "~z" matches a size, etc. Parenthesis
group expressions, and the vertical bar specifies logical OR operations.
Otherwise, patterns are joined using logical AND.
Extremely power and easy to use. I really like being able to limit my
mailbox down to items related to a particular task while I'm doing it, then
expand back up when I'm done.
For example, Scott and I have been trying to be more organized and in
particular are coming up with lists of tasks for the day as the first thing
in the morning. One thing that's important to do is to make sure that we
aren't missing things that have recently come in. By limiting the mailbox
view to things over the last day ("l ~d <1d"), it makes it much easier
to see what new things have come in.
While I'd like to work my mailbox down to 0 items regularly, I often
have things that are just holding place in my main box. This is largely
because I'm not very good at regularly checking other boxes. Using the 1
day limit helps me make sure I triage the new messages to become part of my
task list for the day.
To return back to the full list of messages, you can use the pattern
".*" (by default it searches subjects, and this matches all subjects), or
"~A" to match all messages.
(Post Reply)
(Post Reply)
| Comment |
Author:
Daniel Webb Subject: Another indispensable mutt tool |
Another great tools for Mutt is Mairix (http://www.rpcurnow.force9.co.uk/mairix/). It's a bit different from limit. Unlike limit, it searches all folders, but it has a much less powerful search syntax, because it builds a keyword index and searches on that. I have found Mutt to become annoying when Mailbox folders get more than about 1000 messages, so Mairix allows you to keep an archive yet be able to search it if you can remember a keyword. I have a few embellishments with Mutt/Mairix on my site as well.
| Comment |
Author:
Daniel Webb Subject: More Mutt |
Here's another great tip I just discovered:
With new versions of Mutt, you can put:
folder-hook . 'set record="^"'
in your .muttrc, and when you send messages a copy will be put in the current folder. I've always just put a copy in my inbox and filed them manually, and a lot of people have a "sent" folder, but WHY? If you want to keep an archive of your conversations, doesn't it make sense to put your replies in with the conversation?