From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9088 invoked from network); 3 Jun 1999 15:52:18 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 3 Jun 1999 15:52:18 -0000 Received: (qmail 7615 invoked by alias); 3 Jun 1999 15:52:05 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6452 Received: (qmail 7608 invoked from network); 3 Jun 1999 15:52:03 -0000 From: "Bart Schaefer" Message-Id: <990603155101.ZM4040@candle.brasslantern.com> Date: Thu, 3 Jun 1999 15:51:01 +0000 In-Reply-To: <19990603080251.A31258@dman.com> Comments: In reply to Clint Adams "Re: MAIL, MAILPATH and maildir support" (Jun 3, 8:02am) References: <19990603000030.A20027@dman.com> <990603054646.ZM2687@candle.brasslantern.com> <19990603080251.A31258@dman.com> <37568136.2B496042@thoth.u-net.com> <9906031408.AA18693@ibmth.df.unipi.it> In-Reply-To: <37568136.2B496042@thoth.u-net.com> Comments: In reply to Oliver Kiddle "Re: MAIL, MAILPATH and maildir support" (Jun 3, 2:20pm) In-Reply-To: <9906031408.AA18693@ibmth.df.unipi.it> Comments: In reply to Peter Stephenson "Re: MAIL, MAILPATH and maildir support" (Jun 3, 4:08pm) X-Mailer: Z-Mail (5.0.0 30July97) To: Clint Adams , Oliver Kiddle , Peter Stephenson , zsh-workers@sunsite.auc.dk (Zsh hackers list) Subject: Re: MAIL, MAILPATH and maildir support MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jun 3, 8:02am, Clint Adams wrote: } Subject: Re: MAIL, MAILPATH and maildir support } } > Recursively stat() an entire directory tree?? } > Does anyone really make use of this feature? } } Yes, people use this. Never with upwards-pointing symlinks, obviously. } Well, it's MAILPATH, not GENERICFILEPATH. There are a limited number of } mailbox formats that pose significance to the shell. I know of at least four that aren't simple files, and there's always going to be yet another one. I'd just rather not start down the road. On Jun 3, 2:20pm, Oliver Kiddle wrote: } Subject: Re: MAIL, MAILPATH and maildir support } } Bart Schaefer wrote: } > } > Perhaps checkmailpath is a candidate for some kind of loadable module ... } } In my opinion, it would be useful to put all of the mail related } handling in a loadable module and then make that module quite powerful On Jun 3, 4:08pm, Peter Stephenson wrote: } Subject: Re: MAIL, MAILPATH and maildir support } } A module with more powerful mail commands is a reasonable idea, but I have } some reservations. First, if this is going to be a largish add-on, basic } UNIX mail-file checking (as it currently exists) should probably stay in } the basic shell, since pretty much everybody (? I presume) uses that --- } hence exporting it just gets you all the stuff in the module and doesn't in } practice save anything. Second, with the plethora of mail systems (the } maildir one is just one example), a general module for mail handling is a } big undertaking. One possibility is to make an IMAP module along the lines of the zftp module. Another is to make a "bridge module" that links zsh with, say, c-client (the U. of Washington's mail client library, which is itself extensible to new formats and already supports at least 10 plus three revisions of IMAP and two revisions of POP -- but not maildir). Neither of those address the issue of getting the appropriate part of such a module invoked automatically when mailpath is checked. } As for things like the patch that started all this: it looks to me like it } could be written efficiently enough as a shell function to be run from one } of the functions periodic or precmd. The mail check is performed at approximately the same time as precmd or periodic, so perhaps that's good enough. However, maybe we should consider having a special function name (like precmd and preexec) that, if it's defined, is called in place of the built-in mail-check procedure. That would provide the necessary hook to run a zmodload'd builtin for mail checks (by calling the module from the special function). Or we could make checkmailpath into a builtin command that happens to be run every MAILCHECK seconds, so that a module could override it. I can say with a fair degree of confidence that previous zsh maintainers would vote in favor of using the existing precmd/periodic mechanism, but the problem with that is that you can't set it up "transparently" to use the standard set of shell variables (because you can't -stop- zsh from doing the check on its own if those variables are set). -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com