[comp.mail.elm] Want to remove mail file when done: How?

erict@flatline.UUCP (Lemmy Caution) (03/09/89)

Here's the situation:

AT&T 3b1, 3.0 OS.

The window manager of a 3b1 puts a mail icon at the top of the screen
if mail exists for the user.  "Mail" is defined as a non-zero length
file existing as /usr/mail/username.

To get rid of the icon, the mail file has to dissappear -- not just become
zero lenght.  (You can also hit keystrokes to get rid of the icon, but the
idea is that after you read your mail, the icon goes away...)

Is there a way to make elm2.1 delete this file if it is empty upon
exit?  That's all I want it to do, really.  Right before it finishes
exiting, it checks to see if /usr/mail/username is zero length, and
deletes it if it is.


-- 
J. Eric Townsend |             "Texas: It's like another country,
 uunet!sugar!flatline!erict |   but a lot closer." Texas TV travel ad.
bellcore!texbell!/            511 Parker #2    |EastEnders Mailing List:
BITNET: cosc5fa@uhnix1.BITNET Houston,Tx,77007 |eastender@flatline.UUCP

rob@pbhyf.PacBell.COM (Rob Bernardo) (03/10/89)

In article <390@flatline.UUCP> erict@flatline.UUCP (Lemmy Caution) writes:
+AT&T 3b1, 3.0 OS.
+The window manager of a 3b1 puts a mail icon at the top of the screen
+if mail exists for the user.  "Mail" is defined as a non-zero length
+file existing as /usr/mail/username.
+To get rid of the icon, the mail file has to dissappear -- not just become
+zero lenght.  (You can also hit keystrokes to get rid of the icon, but the
+idea is that after you read your mail, the icon goes away...)
+Is there a way to make elm2.1 delete this file if it is empty upon
+exit?  That's all I want it to do, really.  Right before it finishes
+exiting, it checks to see if /usr/mail/username is zero length, and
+deletes it if it is.

Sorry, but there is not way to get elm to delete an empty spool file.
ELM has a partially implemented elmrc option but this will work only
on your folder files, not your spool file. (And besides the option
is partially broken in ELM 2.1 and earlier - if you save your  elmrc
file, the option is lost. This will be corrected when elm 2.2 comes out.)

So, we will need to add another option to handle spool files.

In any case I recommend you complain to AT&T, because I consider this
icon gizmo to be broken for two reasons.

	1. A zero length file is considered "no mail" by many, many
	other programs that deal  with mail files.

	2. Any program that reports that you have mail must make sure
	that the first non-null line of the mail file is not:
		Forward to [address]
	That is a valid mail spool  file to have and it is *not* considered
	to be a mail file with any messages.
-- 
Rob Bernardo, Pacific Bell UNIX/C Reusable Code Library
Email:     ...![backbone]!pacbell!pbhyf!rob   OR  rob@pbhyf.PacBell.COM
Office:    (415) 823-2417  Room 4E850O San Ramon Valley Administrative Center
Residence: (415) 827-4301  R Bar JB, Concord, California