On 11.01.11, 18:39, Yue Wu wrote: > Hi, group, > > As the title, I want to only show the folders have new emails when in > folder view, how to do that? > > I'm using a method, but don't know if there's a better or built-in > way: write a sh script to detect if the mail folder has files in new/, > if yes, then add it in mailboxes command.
Your idea sounds good, at the moment I'm in the same situation, using mutt on 1 PC and 2 laptops, each one using an on-the-fly-generated version of the folder list, according to folder synced by offlineimap [1], which has different rules on different machines. But, I hate bringing scripts across different machines, so I've an integrated solution into muttrc, as follows: mailboxes +fradeve11/INBOX mailboxes +fradeve11/[Gmail].'Sent Mail' mailboxes +fradeve11/[Gmail].Drafts mailboxes +fradeve11/[Gmail].Starred mailboxes +fradeve11/[Gmail].Bin mailboxes `echo $HOME/.mail/fradeve11/* | sed -e 's/ /\n/g' \ | sed -e '/INBOX/d' \ | sed -e '/^Mail/d' \ | sed -e '/Gmail/d' \ | sed -e '/folder-to-remove-from-list/d' \ | sed -e :a -e N -e 's/\n/ /' -e ta` I'm adding all the Gmail folders before generating the list because in this way they're listed giving priority to Gmail "system" folders; the rest is sorted alphabetically. Hope this helps you integrating folder-listing in muttrc ;) Cheers [1] https://github.com/nicolas33/offlineimap -- Francesco de Virgilio *Ubuntu-it team member* mailto:frad...@ubuntu-it.org http://wiki.ubuntu-it.org/FrancescoDeVirgilio *Wikimedia projects contributor* http://en.wikipedia.org/wiki/User:Fradeve11 *OpenStreetMap Mapper* http://www.openstreetmap.org/user/Fradeve11 *Blog* http://www.fradeve.org "Love - Peace - Freedom - Free Software"
signature.asc
Description: Digital signature