From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10243 invoked from network); 9 Sep 2001 17:35:35 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 9 Sep 2001 17:35:35 -0000 Received: (qmail 26259 invoked by alias); 9 Sep 2001 17:35:19 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 4214 Received: (qmail 26245 invoked from network); 9 Sep 2001 17:35:18 -0000 Date: Sun, 9 Sep 2001 13:33:09 -0400 From: Russell Hoover To: zsh-users@sunsite.dk Cc: Bart Schaefer Subject: Re: New mail notification not working Message-ID: <20010909133309.A3317@panix.com> Mail-Followup-To: zsh-users@sunsite.dk, Bart Schaefer Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i X-To-All-My-Friends-In-Domestic-Surveillance: Hi There, Sports Fans! On Fri 09/07/01 at 05:11 PM +0000, Bart Schaefer wrote: > No, you don't need anything after the name of the directory; you > don't even need the trailing slash, though it should be harmless. Thanks -- I asked that because the last sentence for the ``mailpath'' entry in the manual is this: ``If an element is a directory instead of a file the shell will recursively check every file in every subdirectory ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ of the element." Which 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, and checking ``cur'' could be a disaster as ``cur'' might contain dozens or hundreds of (non-new) messages. > 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 -- if you have multiple maildirs, it gets confused about which > modified-time to compare; it checks each maildir for new-ness against > the modified time of the one preceding it in the mailpath, cycling to > check the first maildir against the last on subsequent calls. 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? (I'd be quite satisfied, for now at least, to have notification working just for my inbox.) I have a total of two directories for all my mail: (a) my inbox, which is ~/.mailspool/rj/ (with the three maildir subdirs -- ``cur'', ``new'', and ``tmp'' -- inside of that) and (b) a ``Mail'' directory, containing about a dozen subdirs of various mailing-list nicknames, etc. (and each of them, of course, has *its* own set of the three maildir subdirs). 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.') (btw, should the opening quote-mark above be where it is, or should it be just before ``$HOME'', or does it matter?) OR, does the mere fact that I have several maildirs *simply existing* in the ``Mail'' directory (which is not defined in either ``MAIL'' or ``mailpath'' in my zsh init files) -- does that *in and of itself* confound mailstat? (If it's the latter, it would seem that I'm out of luck until mailstat() can be re-made along the lines of your suggestion.) > So you ought to be getting notified some of the time, but it would seem > random when you don't know what's going on. I am only getting the (default) notification under one circumstance only, and that is the following: (a) From within either mutt's index or pager, I press `e' in mutt to edit the raw message; (b) I am put into vim and I edit the message; (c) I write-quit out of vim and the new message appears in mutt's index, while the previous version of that message is marked for deletion; (d) I quickly switch to another terminal window and see ``You have new mail.'' appear before the zsh prompt after I press the RETURN key. Thank you for your indulgence (trying not to seem too obtuse about it all). -- // rj@panix.com //