Zsh Mailing List Archive
Messages sorted by:
Re: New mail notification not working
- X-seq: zsh-users 4215
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Russell Hoover <rj@xxxxxxxxx>, zsh-users@xxxxxxxxxx
- Subject: Re: New mail notification not working
- Date: Sun, 9 Sep 2001 18:25:46 +0000
- In-reply-to: <20010909133309.A3317@xxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20010909133309.A3317@xxxxxxxxx>
On Sep 9, 1:33pm, Russell Hoover wrote:
} Subject: Re: New mail notification not working
} Thanks -- I asked that because the last sentence for the ``mailpath''
} entry in the manual
} [...] might well lead one to believe that, in the case of maildirs, unless
} I specified the ``new'' subdir, zsh would check the ``tmp'' and ``cur''
} subdirs as well
The manual doesn't tell anything about maildir support, mostly because
the person who contibuted the mailstat code didn't include a man patch
to go with it. One side-effect of that code is that when checking new
mail, zsh can't tell that maildirs are directories -- mailstat returns
data as if the folder were one huge file. That's why it's so expensive
in the absence of the (broken) optimization.
} > Anyway, mailstat() is using a single static structure to keep track of
} > the last-modified time of the maildir "new" subdir. This means that it
} > only works correctly if you have exactly one maildir directory in your
} > mailpath
} To understand this fully I seem to need to make a distinction: you say
} "exactly one maildir directory in your mailpath" -- Does that mean that
} I must have only one *defined* in my mailpath, or only one in existence?
Exactly one named in the value of the mailpath parameter.
} (I'd be quite satisfied, for now at least, to have notification working
} just for my inbox.)
} Shouldn't notification be working if I just have either of these defined
} in my .zshrc:
} export MAIL=$HOME/.mailspool/rj
} or: mailpath=($HOME/.mailspool/rj'?New mail has arrived.')
That should work, but see below.
} (btw, should the opening quote-mark above be where it is, or should it
} be just before ``$HOME'', or does it matter?)
It does matter; you have it right.
} (a) From within either mutt's index or pager, I press `e' in mutt
} to edit the raw message;
If you have mutt (or any of several other mail programs) running
continuously in another window, zsh won't regularly notify you of new
mail no matter what the mailbox format is, because there is a race
between mutt and the shell to see which one finds the new message
first. Once mutt finds the message and adds it to its index, the
file access time will have changed and zsh won't consider the message
to be new any more.
If your maildirs are on NFS-mounted file systems, NFS attribute caching
can also affect whether zsh correctly detects new mail.
Bart Schaefer Brass Lantern Enterprises
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by: