On Thu, Aug 04, 2016 at 10:38:49AM +1000, c...@zip.com.au wrote: > On 04Aug2016 07:52, Yubin Ruan <ablacktsh...@gmail.com> wrote: > >Fortunately, after a few googling and combining all those info I > >have gathered, > >I find something like this: > > > >push > >'<tag-pattern>~cmutt-us...@mutt.org<enter>;simaps://ablacktsh...@imap.gmail.com/mutt-users<enter>y' > > I would be inclined to replace the ";" with "<tag-prefix>" and the > "s" with "<save-message>". Just to make it all clear, and to avoid > damage by any macro definition you might make. I tend to either > spell it all out with <blah> or (for very short macros) to be > entirely keystrokes (I have a couple of macros for the "message" > view that are just bound to "q" and the same thing in the index view > i.e. "quit the message view and do what would happen in the index > view". > > >I put this in my .muttrc, and every time I open mutt, it would automatically > >move all the messages which are `To: mutt-users@mutt.org` or `Cc: > >mutt-users@mutt.org` to the mutt-users folder. Although it does it remotely, > >which would slow thing down when the network connection is not so good, > > You might be surprised. If all the work is being done by the imap > server and the messages are not being pulled down to mutt and pushed > back up things should be pretty fast even on a poor connection.
That trick did work, but there still exists some problems when I put more than one `push` command in my .muttrc: push '<tag-pattern>~cmutt-us...@mutt.org<enter>;simaps://ablacktsh...@imap.gmail.com/mutt-users<enter>y' push '<tag-pattern>~cmutt-...@mutt.org<enter>;simaps://ablacktsh...@imap.gmail.com/mutt-dev<enter>y' push '<tag-pattern>~f....' ... (just as an example) It seem like that the `push` command would not block when the preceding one is not finished, which result in that those tagged message would NOT be saved to the appropriate folder. That means, for example, those mails that belong to `mutt-users` folder would now be saved to the `mutt-dev` folder, which is probably because the second `push` take effect before the first one can finish and the first <save-message> never get a chance to take effect. any idea? regards, Ruan On Thu, Aug 4, 2016 at 8:38 AM, <c...@zip.com.au> wrote: > On 04Aug2016 07:52, Yubin Ruan <ablacktsh...@gmail.com> wrote: >> >> Fortunately, after a few googling and combining all those info I have >> gathered, >> I find something like this: >> >> push >> '<tag-pattern>~cmutt-us...@mutt.org<enter>;simaps://ablacktsh...@imap.gmail.com/mutt-users<enter>y' > > > I would be inclined to replace the ";" with "<tag-prefix>" and the "s" with > "<save-message>". Just to make it all clear, and to avoid damage by any > macro definition you might make. I tend to either spell it all out with > <blah> or (for very short macros) to be entirely keystrokes (I have a couple > of macros for the "message" view that are just bound to "q" and the same > thing in the index view i.e. "quit the message view and do what would happen > in the index view". > >> I put this in my .muttrc, and every time I open mutt, it would >> automatically >> move all the messages which are `To: mutt-users@mutt.org` or `Cc: >> mutt-users@mutt.org` to the mutt-users folder. Although it does it >> remotely, >> which would slow thing down when the network connection is not so good, > > > You might be surprised. If all the work is being done by the imap server and > the messages are not being pulled down to mutt and pushed back up things > should be pretty fast even on a poor connection. > >> I pretty >> satisfied with this. Although something like procmail of offline-mail >> would make >> thing faster, that would make it much complicated for now, so I would >> rather >> settle down. > > > Indeed. Get comfortable before making your life even more complex. > > Cheers, > Cameron Simpson <c...@zip.com.au>