gmail macro to select only "to" messages in priority inbox (mutt)

0

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.

isomorphismes

Posted 2013-06-14T17:43:29.747

Reputation: 1 534

Answers

1

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"

Patrice Levesque

Posted 2013-06-14T17:43:29.747

Reputation: 780

Awesome! Thank you for the quick response! It worked. – isomorphismes – 2013-06-14T19:49:02.180