* On 16 Jul 2012, chris wrote: > I want to bind key <Tab> to a macro which jump to a mail matching the pattern: > e.g. here is a pattern. > "~x .*@stardiviner" > I do not know where mutt has this function to jump to a mail. > macro index <esc><tab> ????<key sequence>
It does; it's called "search". > In one words: > I want this macro to do this: > Try to find whether has mail matching this pattern: "~x .*@stardiviner". > If not, then jump to another pattern "~P". > If not, then jump to next unread mail with <next-unread-mail> That is harder though. You can make a macro to search for any of those patterns, but your logic as described amounts to a seqence of if/else conditions, and you can't make a macro do that. In other words, if you have messages in this order: 1. mail matching "~x .*@stardiviner" ... 10. mail matching "~N" (unread) ... 15. mail matching "~P" ... 30. mail matching "~x .*@stardiviner" You can make a macro that skips from 1 to 10 to 15 to 30, but you can't make a macro that goes from 1 to 30 to 15 to 10, which is what your conditional logic describes. -- David Champion • d...@uchicago.edu • IT Services • University of Chicago