From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/11129 Path: main.gmane.org!not-for-mail From: Christopher Davis Newsgroups: gmane.emacs.gnus.general Subject: Re: Gnus+procmail and display-time Date: 27 May 1997 16:12:44 -0400 Message-ID: References: <2x3erfkv40.fsf@ccae-sv.inesc.pt> <8ck9kr2jlf.fsf@gadget.cscaper.com> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: multipart/mixed; boundary="Multipart_Tue_May_27_16:12:44_1997-1" Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1035150891 28448 80.91.224.250 (20 Oct 2002 21:54:51 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 21:54:51 +0000 (UTC) Return-Path: Original-Received: from sandy.calag.com (root@sandy [206.190.83.128]) by altair.xemacs.org (8.8.5/8.8.5) with ESMTP id OAA13464 for ; Tue, 27 May 1997 14:57:25 -0700 Original-Received: from xemacs.org (xemacs.cs.uiuc.edu [128.174.252.16]) by sandy.calag.com (8.8.5/8.8.5) with ESMTP id OAA24503 for ; Tue, 27 May 1997 14:57:12 -0700 Original-Received: from ifi.uio.no (0@ifi.uio.no [129.240.64.2]) by xemacs.org (8.8.5/8.8.5) with SMTP id QAA13548 for ; Tue, 27 May 1997 16:56:29 -0500 (CDT) Original-Received: from claymore.vcinet.com (claymore.vcinet.com [208.205.12.23]) by ifi.uio.no with SMTP (8.6.11/ifi2.4) id for ; Tue, 27 May 1997 22:14:04 +0200 Original-Received: (qmail 31145 invoked by uid 504); 27 May 1997 20:14:02 -0000 Original-Received: (qmail 31142 invoked from network); 27 May 1997 20:14:02 -0000 Original-Received: from loiosh.kei.com (ckd@192.88.144.32) by claymore.vcinet.com with SMTP; 27 May 1997 20:14:02 -0000 Original-Received: (from ckd@localhost) by loiosh.kei.com (8.8.5/8.8.5) id QAA06260; Tue, 27 May 1997 16:12:44 -0400 (EDT) Original-To: ding@gnus.org In-Reply-To: merlyn@stonehenge.com's message of 22 May 97 23:05:48 GMT X-Mailer: Gnus v5.4.52/XEmacs 19.15 X-Face: I8Alb*-ZdjN\/8k_QR,^l^m6GQB'S-B:}DVP].1HOw#tx:TX$k;Wl;4zqjWR|-jheM#? &beRf(!|0b0m=M~=%.Am>"QEY.(#Ys.%"s?z,hmwp&y0%p>9+T X-Attribution: ckd Original-Lines: 149 Original-Xref: altair.xemacs.org dgnus-list:1519 Xref: main.gmane.org gmane.emacs.gnus.general:11129 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:11129 --Multipart_Tue_May_27_16:12:44_1997-1 Content-Type: text/plain; charset=US-ASCII RS> == Randal Schwartz RS> I file all my "direct to me, not from a mailing list" email into RS> a single folder (my "inbox", because it was rooted in my MH usage). RS> For me, this is: RS> /home/merlyn/.incoming/inbox.spool [...] RS> Other filed mail doesn't trigger, but that's stuff I don't need RS> immediate notify about anyway. I use a similar setup, except that I have all the procmail spools named the same as the nnml groups they get sucked into (no suffix). I manage them with some shell aliases (tcsh) and a pair of perl scripts. The aliases: if ($?prompt) then set maildir="$HOME/Mail/spool" set mail="$maildir/inbox" alias m "subj -f $mail" alias mb "subj -f $maildir/\!:1" alias mt "subj -f $mail | tail" alias mtb "subj -f $maildir/\!:1 | tail" alias mnt "subj -f $mail | cat -n | tail" alias mntb "subj -f $maildir/\!:1 | cat -n | tail" alias mn "subj -f $mail | cat -n" alias mnb "subj -f $maildir/\!:1 | cat -n" alias mm less -+E +G -e $mail alias mmb less -+E +G -e $maildir/\!:1 endif The perl scripts are attached. One's for X displays (uses Tk); the other is for command lines. They're fairly self explanatory (especially the second one). The Tk one has a few leftovers from earlier versions that used cute little icons instead of colors; just ignore them... :) --Multipart_Tue_May_27_16:12:44_1997-1 Content-Type: application/octet-stream Content-Disposition: attachment; filename="tkckm" Content-Transfer-Encoding: 7bit #!/usr/local/bin/perl #use strict; use Tk; ######## ### configuration section ######## my $spooldir = "$ENV{'HOME'}/Mail/spool"; my $delay = 30 * 1000; # measured in msec #my $picdir = "$ENV{'HOME'}/lib/tkckm/"; #my $emptypic = "$picdir/empty.xpm"; #my $readpic = "$picdir/read.xpm"; #my $newpic = "$picdir/new.xpm"; #my $font = "-*-lucida-medium-r-*-*-10-*-*-*-*-*-*-*"; $color{'read'} = "black"; $color{'empty'} = "gray80"; $color{'new'} = "red"; ######## ### end of configuration section ######## chdir($spooldir) || die "can't chdir"; sub scan_spools { foreach $spoolfile (@spoolfiles) { ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, $atime,$mtime,$ctime,$blksize,$blocks) = stat($spoolfile); if ($size == 0) { $status{$spoolfile} = 'empty'; } elsif ($atime < $mtime) { $status{$spoolfile} = 'new'; } else { $status{$spoolfile} = 'read'; } } } sub update_widgets { foreach $mbox (keys %status) { $namelabels{$mbox}->configure(-foreground => $color{$status{$mbox}}); } } sub scan_and_update { &scan_spools; &update_widgets; after($delay,\&scan_and_update); } @spoolfiles = <*>; # XXX should be able to dynamically add files &scan_spools; $main = MainWindow->new(); $main->Pixmap('empty',-file => $emptypic); $main->Pixmap('read',-file => $readpic); $main->Pixmap('new',-file => $newpic); foreach $mbox (sort keys %status) { $namelabels{$mbox} = $main->Label(-text => $mbox, -anchor => 'e', ); $namelabels{$mbox}->pack(-fill => 'x', -side => 'top'); } &scan_and_update; MainLoop; --Multipart_Tue_May_27_16:12:44_1997-1 Content-Type: application/octet-stream Content-Disposition: attachment; filename="ckm" Content-Transfer-Encoding: 7bit #!/usr/bin/perl $spooldir = "$ENV{'HOME'}/Mail/spool"; chdir($spooldir) || die "can't chdir"; foreach (<*>) { ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, $atime,$mtime,$ctime,$blksize,$blocks) = stat($_); next if ($size == 0); print (($atime < $mtime)?" ** ":" "); print $_,"\n"; } --Multipart_Tue_May_27_16:12:44_1997-1--