Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have this line in ~/.muttrc:

macro index tp "<change-folder>[Gmail]/Important<enter>" "Go to priority inbox"

which successfully restricts what mutt grabs to only Gmail's priority inbox.

But, it grabs messages From me as well as messages To me. That's not what I want: I want to see only priority messages that are to me.

I can think of two ways to fix this annoyance:

  1. Use mutt's built-in filters after typing t,p to remove the messages From me.
  2. Improve the macro index line above. Maybe gmail accepts a code that will further delimit what it's grabbing. (In the web interface's search bar I know it would be -from:my.address@gmail.com. But I'm not sure how to work that into [Gmail]/Important.)

I've googled around but can't find exactly these types of answers. Any help or suggestions would be appreciated.

share|improve this question
up vote 1 down vote accepted

You are really close. All you need to add to your macro is a limit; using mutt directly you'd press “l” then enter “~p” (you can see the full list of patterns in the mutt documentation). So in a macro you would get something like:

macro index tp "<change-folder>[Gmail]/Important<enter><limit>~p<enter>" "Go to priority inbox"
share|improve this answer
    
Awesome! Thank you for the quick response! It worked. – isomorphismes Jun 14 '13 at 19:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .