int mutt_parse_mailboxes (BUFFER *path, BUFFER *s, unsigned long data, BUFFER *err)
{
- BUFFY **tmp;
+ BUFFY **tmp,*tmp1;
char buf[_POSIX_PATH_MAX];
#ifdef BUFFY_SIZE
struct stat sb;
{
mutt_extract_token (path, s, 0);
strfcpy (buf, path->data, sizeof (buf));
+
+ if(data == M_UNMAILBOXES && mutt_strcmp(buf,"*") == 0)
+ {
+ for (tmp = &Incoming; *tmp;)
+ {
+ safe_free((void **)&((*tmp)->path));
+ tmp1=(*tmp)->next;
+ safe_free((void **)tmp);
+ *tmp=tmp1;
+ }
+ return 0;
+ }
+
mutt_expand_path (buf, sizeof (buf));
/* Skip empty tokens. */
break;
}
+ if(data == M_UNMAILBOXES)
+ {
+ if(*tmp)
+ {
+ safe_free((void **)&((*tmp)->path));
+ tmp1=(*tmp)->next;
+ safe_free((void **)tmp);
+ *tmp=tmp1;
+ }
+ continue;
+ }
+
if (!*tmp)
{
*tmp = (BUFFY *) safe_calloc (1, sizeof (BUFFY));
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*/
+/*parameter to mutt_parse_mailboxes*/
+#define M_MAILBOXES 1
+#define M_UNMAILBOXES 2
+
typedef struct buffy_t
{
char *path;
<sect1>Defining mailboxes which receive mail<label id="mailboxes">
<p>
-Usage: <tt/mailboxes/ [!]<em/filename/ [ <em/filename/ ... ]
+Usage: <tt/[un]mailboxes/ [!]<em/filename/ [ <em/filename/ ... ]
This command specifies folders which can receive mail and
which will be checked for new messages. By default, the
specified by the <tt/mailboxes/ command, and indicate which contain new
messages. Mutt will automatically enter this mode when invoked from the
command line with the <tt/-y/ option.
+
+The ``unmailboxes'' command is used to remove a token from the list
+of folders which receive mail. Use ``unmailboxes *'' to remove all
+tokens.
+
<p>
<bf/Note:/ new mail is detected by comparing the last modification time to
the last access time. Utilities like <tt/biff/ or <tt/frm/ or any other
.\" along with this program; if not, write to the Free Software
.\" Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
.\"
-.TH muttrc 5 "February 2001" Unix "User Manuals"
+.TH muttrc 5 "September 2002" Unix "User Manuals"
.SH NAME
.PP
muttrc \- Configuration file for the Mutt Mail User Agent
messages will be moved to that folder when the mail folder is left.
.IP
The first matchig \fBmbox-hook\fP applies.
-.TP
+.PP
+.nf
\fBmailboxes\fP \fIfilename\fP [ \fIfilename\fP ... ]
-This command specifies folders which can receive mail and which will
+\fBunmailboxes\fP [ \fB*\fP | \fIfilename\fP ... ]
+.fi
+.IP
+The \fBmailboxes\fP specifies folders which can receive mail and which will
be checked for new messages. When changing folders, pressing space
-will cycle through folders with new mail.
+will cycle through folders with new mail. The \fBunmailboxes\fP
+command is used to remove a file name from the list of folders which
+can receive mail. If "\fB*\fP" is specified as the file name, the
+list is emptied.
.PP
.nf
\fBmy_hdr\fP \fIstring\fP
{ "ignore", parse_ignore, 0 },
{ "lists", parse_list, UL &MailLists },
{ "macro", mutt_parse_macro, 0 },
- { "mailboxes", mutt_parse_mailboxes, 0 },
+ { "mailboxes", mutt_parse_mailboxes, M_MAILBOXES },
+ { "unmailboxes", mutt_parse_mailboxes, M_UNMAILBOXES },
{ "message-hook", mutt_parse_hook, M_MESSAGEHOOK },
{ "mbox-hook", mutt_parse_hook, M_MBOXHOOK },
{ "mime_lookup", parse_list, UL &MimeLookupList },