Gnus development mailing list
 help / color / mirror / Atom feed
* Gnus+procmail and display-time
@ 1997-05-22 22:19 Nelson Jose dos Santos Ferreira
  1997-05-22 22:50 ` Mark Boyns
  1997-05-22 23:05 ` Randal Schwartz
  0 siblings, 2 replies; 11+ messages in thread
From: Nelson Jose dos Santos Ferreira @ 1997-05-22 22:19 UTC (permalink / raw)



Hi!

I use procmail to split my mail, and then read it with gnus. It's a lot faster
than nnmail-split !!! 
The down side is I no longer have the mail indicator on the modeline :(

I'm thinking of moving the entire procmail files to a directory where gnus
will then read the mail. display-time will check the log there. 

As anybody done something like that ?

I know I have to RTFM for Gnus and procmail (for the locks on the files move),
but if you could save me trouble I'd appreciate.

Thanks in advance,

	Nelson Ferreira
---
Nelson Jose dos Santos Ferreira |  .  .  .  | INESC/PT-SVC   Lisbon,PORTUGAL
                                | |. /  / . | PT-Servicos
mailto:Nelson.Ferreira@inesc.pt |.||\| | /  | Phone:+351 (1) 3100063
http://ccae-sv.inesc.pt/~njsf   | .|<:/  \. | Fax  :+351 (1) 3100008


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Gnus+procmail and display-time
  1997-05-22 22:19 Gnus+procmail and display-time Nelson Jose dos Santos Ferreira
@ 1997-05-22 22:50 ` Mark Boyns
  1997-05-22 23:05 ` Randal Schwartz
  1 sibling, 0 replies; 11+ messages in thread
From: Mark Boyns @ 1997-05-22 22:50 UTC (permalink / raw)
  Cc: ding

22 May 1997 Nelson.Ferreira@inesc.pt writes:

> Hi!
> 
> I use procmail to split my mail, and then read it with gnus. It's a lot faster
> than nnmail-split !!! 
> The down side is I no longer have the mail indicator on the modeline :(
> 
> I'm thinking of moving the entire procmail files to a directory where gnus
> will then read the mail. display-time will check the log there. 
> 
> As anybody done something like that ?
> 
> I know I have to RTFM for Gnus and procmail (for the locks on the files move),
> but if you could save me trouble I'd appreciate.

Use display-time-mail-file:

display-time-mail-file's value is nil

Documentation:
*File name of mail inbox file, for indicating existence of new mail.
Non-nil and not a string means don't check for mail.  nil means use
default, which is system-dependent, and is the same as used by Rmail.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Gnus+procmail and display-time
  1997-05-22 22:19 Gnus+procmail and display-time Nelson Jose dos Santos Ferreira
  1997-05-22 22:50 ` Mark Boyns
@ 1997-05-22 23:05 ` Randal Schwartz
  1997-05-27 20:12   ` Christopher Davis
  1997-08-20 17:02   ` Jason R Mastaler
  1 sibling, 2 replies; 11+ messages in thread
From: Randal Schwartz @ 1997-05-22 23:05 UTC (permalink / raw)
  Cc: ding

>>>>> "Nelson" == Nelson Jose dos Santos Ferreira <Nelson.Ferreira@inesc.pt> writes:

Nelson> I use procmail to split my mail, and then read it with
Nelson> gnus. It's a lot faster than nnmail-split !!!  The down side
Nelson> is I no longer have the mail indicator on the modeline :(

Nelson> I'm thinking of moving the entire procmail files to a
Nelson> directory where gnus will then read the mail. display-time
Nelson> will check the log there.

I file all my "direct to me, not from a mailing list" email into
a single folder (my "inbox", because it was rooted in my MH usage).
For me, this is:

	/home/merlyn/.incoming/inbox.spool

I then included the following two lines in my .login:

        setenv MAIL /home/merlyn/.incoming/inbox.spool
        set mail=$MAIL

Works like a charm.  GNU Emacs picks it up, and flags new Mail.  The
shells announce "you've got mail".  Heck, even the "from(1)" command
works. :-)

Other filed mail doesn't trigger, but that's stuff I don't need
immediate notify about anyway.

If you can live with that, there's an off-the-shelf solution.

-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@ora.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Gnus+procmail and display-time
  1997-05-22 23:05 ` Randal Schwartz
@ 1997-05-27 20:12   ` Christopher Davis
  1997-08-20 17:02   ` Jason R Mastaler
  1 sibling, 0 replies; 11+ messages in thread
From: Christopher Davis @ 1997-05-27 20:12 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 1338 bytes --]

RS> == Randal Schwartz <merlyn@stonehenge.com>

 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... :)


[-- Attachment #2: tkckm --]
[-- Type: application/octet-stream, Size: 1591 bytes --]

#!/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;

[-- Attachment #3: ckm --]
[-- Type: application/octet-stream, Size: 312 bytes --]

#!/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";
}

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Gnus+procmail and display-time
  1997-05-22 23:05 ` Randal Schwartz
  1997-05-27 20:12   ` Christopher Davis
@ 1997-08-20 17:02   ` Jason R Mastaler
  1997-08-20 18:41     ` Chris D. Halverson
  1 sibling, 1 reply; 11+ messages in thread
From: Jason R Mastaler @ 1997-08-20 17:02 UTC (permalink / raw)


Randal Schwartz <merlyn@stonehenge.com> writes:

> >>>>> "Nelson" == Nelson Jose dos Santos Ferreira <Nelson.Ferreira@inesc.pt> writes:
> 
> Nelson> I use procmail to split my mail, and then read it with
> Nelson> gnus. It's a lot faster than nnmail-split !!!  The down side
> Nelson> is I no longer have the mail indicator on the modeline :(
> 
> Nelson> I'm thinking of moving the entire procmail files to a
> Nelson> directory where gnus will then read the mail. display-time
> Nelson> will check the log there.
> 
> I file all my "direct to me, not from a mailing list" email into
> a single folder (my "inbox", because it was rooted in my MH usage).
> For me, this is:
> 
> 	/home/merlyn/.incoming/inbox.spool
> 
> I then included the following two lines in my .login:
> 
>         setenv MAIL /home/merlyn/.incoming/inbox.spool
>         set mail=$MAIL
> 
> Works like a charm.  GNU Emacs picks it up, and flags new Mail.  The
> shells announce "you've got mail".  Heck, even the "from(1)" command
> works. :-)

This only works with GNU Emacs however.  XEmacs doesn't recognize when
you've set $MAIL.  XEmacs users need to set `display-time-mail-file'
in the .emacs to get modeline mail notification working again.

   Jason R. Mastaler                      jason@mastaler.com


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Gnus+procmail and display-time
  1997-08-20 17:02   ` Jason R Mastaler
@ 1997-08-20 18:41     ` Chris D. Halverson
  1997-08-20 19:49       ` Jason R Mastaler
  0 siblings, 1 reply; 11+ messages in thread
From: Chris D. Halverson @ 1997-08-20 18:41 UTC (permalink / raw)


Jason R Mastaler <jason@mastaler.com> writes:

> This only works with GNU Emacs however.  XEmacs doesn't recognize when
> you've set $MAIL.  XEmacs users need to set `display-time-mail-file'

Yes it does. I have the following set:

{cdh@worf} 1:39pm (~) > echo $MAIL
/home/cdh/.incoming/inbox.spool
{cdh@worf} 1:39pm (~) > echo $mail
/home/cdh/.incoming/inbox.spool
{cdh@worf} 1:39pm (~) > 

M-h v display-time-mail-file:

display-time-mail-file's value is nil
  -- a variable declared in Lisp.

Documentation:
*File name of mail inbox file, for indicating existence of new mail.
Non-nil and not a string means don't check for mail.  nil means use
default, which is system-dependent, and is the same as used by Rmail.

Works like a champ in XEmacs 20.2:

(emacs-version)
"XEmacs 20.2 [Lucid] (i386-unknown-solaris2.4) of Sat May 17 1997 on vivid"

Chris

-- 
Chris D. Halverson                         Complete Internet Solutions
PGP mail accepted, finger for public key   http://www.CompleteIS.com/~cdh/


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Gnus+procmail and display-time
  1997-08-20 18:41     ` Chris D. Halverson
@ 1997-08-20 19:49       ` Jason R Mastaler
  1997-08-21 12:26         ` Jens Lautenbacher
  0 siblings, 1 reply; 11+ messages in thread
From: Jason R Mastaler @ 1997-08-20 19:49 UTC (permalink / raw)


cdh@CompleteIS.com (Chris D. Halverson) writes:

> > This only works with GNU Emacs however.  XEmacs doesn't recognize when
> > you've set $MAIL.  XEmacs users need to set `display-time-mail-file'
> 
> Yes it does. I have the following set:
> 
> {cdh@worf} 1:39pm (~) > echo $MAIL
> /home/cdh/.incoming/inbox.spool
> {cdh@worf} 1:39pm (~) > echo $mail
> /home/cdh/.incoming/inbox.spool
> {cdh@worf} 1:39pm (~) > 

Actually, it doesn't when you've only got MAIL (uppercase) set.  You
are right though, with both "mail" and "MAIL" XEmacs does pick up on
things for new mail notification.  This seems strange and non-standard
to me.  I don't think I've seen a case when just "MAIL" is ignored and
"mail" is needed.  GNU Emacs doesn't work this way as I mentioned.  Oh
well, thanks for the tip.

   Jason R. Mastaler                      jason@mastaler.com


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Gnus+procmail and display-time
  1997-08-20 19:49       ` Jason R Mastaler
@ 1997-08-21 12:26         ` Jens Lautenbacher
  1997-08-21 13:35           ` Jason R Mastaler
  0 siblings, 1 reply; 11+ messages in thread
From: Jens Lautenbacher @ 1997-08-21 12:26 UTC (permalink / raw)


Jason R Mastaler <jason@mastaler.com> writes:

> cdh@CompleteIS.com (Chris D. Halverson) writes:
> 
> > > This only works with GNU Emacs however.  XEmacs doesn't recognize when
> > > you've set $MAIL.  XEmacs users need to set `display-time-mail-file'
> > 
> > Yes it does. I have the following set:
> > 
> > {cdh@worf} 1:39pm (~) > echo $MAIL
> > /home/cdh/.incoming/inbox.spool
> > {cdh@worf} 1:39pm (~) > echo $mail
> > /home/cdh/.incoming/inbox.spool
> > {cdh@worf} 1:39pm (~) > 
> 
> Actually, it doesn't when you've only got MAIL (uppercase) set.  You
> are right though, with both "mail" and "MAIL" XEmacs does pick up on
> things for new mail notification.  This seems strange and non-standard
> to me.  I don't think I've seen a case when just "MAIL" is ignored and
> "mail" is needed.  GNU Emacs doesn't work this way as I mentioned.  Oh
> well, thanks for the tip.
> 
>    Jason R. Mastaler                      jason@mastaler.com

No, it works with MAIL set. I have tried it and it works, Chris tried
it and it works. Maybe the problem is somewhere else?

   jtl


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Gnus+procmail and display-time
  1997-08-21 12:26         ` Jens Lautenbacher
@ 1997-08-21 13:35           ` Jason R Mastaler
  1997-08-21 17:52             ` Leonard Blanks
  0 siblings, 1 reply; 11+ messages in thread
From: Jason R Mastaler @ 1997-08-21 13:35 UTC (permalink / raw)


Jens Lautenbacher <jens@lemming0.lem.uni-karlsruhe.de> writes:

> No, it works with MAIL set. I have tried it and it works, Chris tried
> it and it works. Maybe the problem is somewhere else?

And you are sure $mail is not set?  i.e, 

$ echo $mail
 
$ 

   Jason R. Mastaler                      jason@mastaler.com
 


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Gnus+procmail and display-time
  1997-08-21 13:35           ` Jason R Mastaler
@ 1997-08-21 17:52             ` Leonard Blanks
  1997-08-22  2:16               ` Jason R Mastaler
  0 siblings, 1 reply; 11+ messages in thread
From: Leonard Blanks @ 1997-08-21 17:52 UTC (permalink / raw)


>>>>> "JM" == Jason R Mastaler <jason@mastaler.com> writes:

 JM> Jens Lautenbacher <jens@lemming0.lem.uni-karlsruhe.de> writes:
 >> No, it works with MAIL set. I have tried it and it works, Chris tried
 >> it and it works. Maybe the problem is somewhere else?

 JM> And you are sure $mail is not set?  i.e, 

 JM> $ echo $mail

 JM> $ 

It's in the code (display-time-function in time.el).  Perhaps earlier
versions used *mail* instead.

-- 
Len


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Gnus+procmail and display-time
  1997-08-21 17:52             ` Leonard Blanks
@ 1997-08-22  2:16               ` Jason R Mastaler
  0 siblings, 0 replies; 11+ messages in thread
From: Jason R Mastaler @ 1997-08-22  2:16 UTC (permalink / raw)


Leonard Blanks <ltb@haruspex.demon.co.uk> writes:

> It's in the code (display-time-function in time.el).  Perhaps earlier
> versions used *mail* instead.

Yeah, my problem turned out to be because of a CDE configuration
issue.  Sorry for the fuss.

   Jason R. Mastaler                      jason@mastaler.com
 


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~1997-08-22  2:16 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-05-22 22:19 Gnus+procmail and display-time Nelson Jose dos Santos Ferreira
1997-05-22 22:50 ` Mark Boyns
1997-05-22 23:05 ` Randal Schwartz
1997-05-27 20:12   ` Christopher Davis
1997-08-20 17:02   ` Jason R Mastaler
1997-08-20 18:41     ` Chris D. Halverson
1997-08-20 19:49       ` Jason R Mastaler
1997-08-21 12:26         ` Jens Lautenbacher
1997-08-21 13:35           ` Jason R Mastaler
1997-08-21 17:52             ` Leonard Blanks
1997-08-22  2:16               ` Jason R Mastaler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).