Subject: Q: odd delays in pine

From: [email-masked] (Tom Glanzman)
Date: Mon, 8 May 1995 20:35:31 GMT

I've just started using pine (version 3.89 on an rs/6000 running AIX 3.2.5) 
and notice two curious delays:

 - after mail arrives (according to xbiff), it takes several minutes
   for this to register with pine's INBOX display

 - whenever pine senses a new mail message or some other event occurs,
   the pine window seems to freeze for about 10-15 seconds during which
   time one cannot, for example, continue composing a new outgoing mail
   message.

My main question is whether this behavior is unique to my system, is 
inherent to pine, or whether it reflects some internal parameter 
setting(s) that can be changed to eliminate these delays.

Other Qs:
 - is there a way to automatically create a monthly file of received
   messages (analogously to the way sent messages are handled)?
 - is there a reason I should try to get a new version of pine
   installed? (Is there a newer version for the rs/6000?)

Please respond by email as it is difficult for me to carefully monitor
this news group.

  Thank you for your help!

---
 Tom Glanzman                        | [email-masked]  
 Stanford Linear Accelerator Center  | http://www.slac.stanford.edu/~dragon
 M/S 95, P.O. Box 4349               | (415) 926-3160 (office)
 Stanford, California   94309   USA  | (415) 926-2657 (FAX)

---

From: [email-masked] (Trey Harris)
Date: 9 May 1995 02:18:30 GMT

In article <[email-masked]>,
>   for this to register with pine's INBOX display

It should take around two and a half minutes at maximum (but a watched 
kettle never boils).  Press control-L to get Pine to check immediately.

>   time one cannot, for example, continue composing a new outgoing mail

Get Pine version 3.91.  (But be careful of the pine-interrupted-mail bug, 
it happens a lot under AIX! Just remember if you get weird errors about 
having a postponed composition, but not having anything to continue, just 
'rm .pine-interrupted*' in your home directory.)

>   messages (analogously to the way sent messages are handled)?

Um...

export EDITOR=/usr/local/bin/pico
  (or setenv EDITOR /usr/local/bin/pico, whichever works)
crontab -e

0 0 1 * * (cd $HOME/mail ; mv saved-messages $(date +saved-messages-\%b-\%Y))

[save]

Then at midnight on the first of every month, saved-messages becomes 
saved-messages-Month-Year, just like sent-mail.  Unfortunately, by this 
method, your May messages will be marked June, June July, and so on.  Maybe

59 23 31 * * (cd...

except that will not work in February, April, May, September, and 
November.  (Ouch, this is getting difficult!)

You could always write a Perl script called backdate:

#!/usr/bin/perl
# backdate--simple date formatter running a month slow
%convert_months=('Jan','Dec',
                 'Feb','Jan',
                 'Mar','Feb',
                 'Apr','Mar',
                 'May','Apr',
                 'Jun','May',
                 'Jul','Jun',
                 'Aug','Jul',
                 'Sep','Aug',
                 'Oct','Sep',
                 'Nov','Oct',
                 'Dec','Nov');
$_ = "@ARGV"; # load $_ with arguments separated by a space
($lastMonth, $year) = (split(/[:\n]/, `date +%b:%Y`));
$month = $convert_months{$lastMonth}; 
s#\+(.*)%b(.*)#\1$month\2#; # interpolate %b to be last month
s#(.*)%Y(.*)#\1$year\2#; # interpolate %Y to be this year
print "$_\n"; # print the durned thing
__END__

(This is not an example of Good Perl Coding.  It's ugly, probably no one 
understands it but me, but hey, I wrote in in sixty seconds, and it 
works, so who cares?)

Then, you can rewrite the crontab as:

0 0 1 * * (cd $HOME/mail; mv saved-messages `backdate +saved-messages-%b-%Y`)

And that'll do what you want.  Don't forget to include the full pathname 
for backdate unless you want to stick it in /usr/bin!  (phew!)

>   installed? (Is there a newer version for the rs/6000?)

More features, greater stability, faster mailbox opening...the only 
reason to stay away is the interrupted mail thing.

>  Thank you for your help!

Hope I was some help and didn't send you running for the hills screaming 
blue murder!
-- 
Trey Harris                              http://sunsite.unc.edu/harris
  System Administrator, Project Isis, Office of Information Technology
                       The University of North Carolina at Chapel Hill

---

From: [email-masked] (Trey Harris)
Date: 9 May 1995 02:28:11 GMT

In article <[email-masked]>,

>0 0 1 * * (cd $HOME/mail; mv saved-messages `backdate +saved-messages-%b-%Y`)

After all that, I make a mistake.  Oh, what a comedy of errors my life is.
That should be:

0 0 1 * * (cd $HOME/mail; mv saved-messages `backdate +saved-messages-\%b-\%Y`)

(Betcha didn't know that a percent sign is a special character in a 
crontab, didja? :)
-- 
Trey Harris                              http://sunsite.unc.edu/harris
  System Administrator, Project Isis, Office of Information Technology
                       The University of North Carolina at Chapel Hill

---

From: [email-masked] (Trey Harris)
Date: 9 May 1995 03:13:57 GMT

>#!/usr/bin/perl

Someone mailed me mentioning that the Perl script I posted had a bug in
that in January 1996 it would save the file as "saved-messages-Dec-1996". 
Someone else mentioned that I should have switched the names of the
$lastMonth and $month variables. Sheesh, you people are impossible! :) But
here's a fix...(I am not supporting this thing.  You learn Perl and
support it yourself. :)

#!/usr/bin/perl

$_ = "@ARGV"; # load $_ with arguments separated by a space
($month, $year) = (split(/[:\n]/, `date +%b:%Y`));
$year-- if $month eq 'Jan';
$lastMonth = $convert_months{$month}; 
s#\+(.*)%b(.*)#\1$lastMonth\2#; # interpolate %b to be last month
s#(.*)%Y(.*)#\1$year\2#; # interpolate %Y to be this year
print "$_\n"; # print the durned thing
__END__
-- 
Trey Harris                              http://sunsite.unc.edu/harris
  System Administrator, Project Isis, Office of Information Technology
                       The University of North Carolina at Chapel Hill