<<< Date Index >>>     <<< Thread Index >>>

Re: How to erase already defined mailboxes ?



Hi Vladimir!

On Fri, 28 Mar 2008, Vladimir Marek wrote:

> I'm having many mailboxes receiving mail. Many mailinglists, so I'm
> getting mail all the time. It can get quite disturbing. I was thinking
> that I would define list of "core mailboxes" and list of "all
> mailboxes". At the morning I would switch on "all mailboxes" and read
> everything. Then I would switch to "core" and I wouldn't be disturbed by
> not so important mails. During day I could switch back and forward
> between those. Can I achieve this without restarting mutt, ie. can I
> empty the currently defined mailboxes ?

Yes. Create two textfiles that define your mailboxes, e.g.
file 1 contains all important mailboxes and file 2 contains all 
mailboxes. So your file1 looks like this:
,----
| unmailboxes *
| mailboxes a b c d
`----

and file2 like this:

,----
| unmailboxes *
| mailboxes foo bar a b c d
`----

Now you can create a macro that will toggle sourcing either of these 
two files whenever you hit <Esc>f
,----
| macro index,pager \em "<enter-command>source ~/.mutt/file1<enter>\
| <enter-command>macro index,pager \\ef  \\eM \
| \"toggle Mailboxview\"<enter>" "Important mailboxes, use <Esc>f to toggle"
| macro index,pager \eM "<enter-command>source ~/.mutt/file2<enter>\
| <enter-command>macro index,pager \\ef  \\em \
| \"toggle Mailboxview\"<enter>" "Important mailboes, use <Esc>f to toggle"
| macro index,pager <ESC>f <ESC>m "toggle Mailboxes: important/all"
`----

Thinking further you could even dynamically generate the mailbox list  
in file1 and file2 like it is mentioned in the wiki: 
http://wiki.mutt.org/?ConfigTricks

regards,
Christian
-- 
:wq!