Friday, June 5, 2009

Slice and dice your mail with search operators in Gmail

(From Gmail Blog)

My friends email me all the time with ideas for improving Gmail. Just this weekend, my friend Dave said he wanted a way to select all of his messages with a certain label (like "important"). Two weeks ago, Adam came up with the idea of a button that would filter his inbox to only show unread items. Good ideas, but it turns out that doing stuff like this (and much more) is already possible using search operators

For example, Dave would just need to search for "in:important" to get all items labeled "important," and Adam would just search for "is:unread in:inbox" to see all the unread messages in his inbox.

Here are a few other useful ways to filter your inbox:
  • "to:me is:starred" shows all messages sent directly to you that are starred
  • "is:chat from:heather" shows all chat conversations you had with Heather
  • "is:starred -in:inbox" shows all your starred messages that aren't in your inbox (a good way to find anything important that you might have accidentally archived)
  • "from:elliot filename:pdf" shows all messages from Elliot that have a pdf attachment

We've written about search operators here before, but lots of people find them hard to remember. That's why we built Search Autocomplete in Gmail Labs, designed to make searching in Gmail much easier. Instead of having to remember the exact syntax for advanced searches, you can just start typing, and search autocomplete will help you fill in the rest. If you find yourself doing some of the same searches over and over again, consider creating a permanent link to them using Quick Links in Labs.