Google
 

Trailing-Edge - PDP-10 Archives - decuslib20-01 - decus/20-0004/newmail.tty
There are no other files named newmail.tty in the archive.
<LISPUSERS>NEWMAIL

NEWMAIL is a file containing some utility functions to handle new
mail in your mailbox (assuming the ARPAnet TENEX/TOPS20 mailbox
format).

newmailauthors[mailfile]

        -  Using mailfile (if NIL then your login mailbox -- if T
           then your connected mailbox) this function determines
           if you have new mail.  If you don't have new mail then
           it returns NIL.  Otherwise it returns a list of
           "authors" of all your new mail.  Authorship is
           determined by what follows on the line following the
           "From:"  in the message.  If the global variable
           NEWMAILINCLUDESITES is NIL (the default) then
           newmailauthors returns a list of atoms corresponding to
           "usernames", otherwise it returns a list of lists of
           the atoms following the "From:"  on the line (e.g.
           ((Yonke at BBN-TENEXD)...).  If the authorship of a
           particular message can't be determined, the atom
           Unknown is used for that message.  Duplicate authors
           appear only once (i.e.  if you have several messages
           from one person, the author will only appear once in
           the returned list).
 
           Note:  This function tries to be efficient (e.g.
           hanging onto file pointers, no extraneous reparsing,
           etc.).  It works quite well and is very useful if you
           keep your mailbox small (less than 100 messages) but if
           you habitually keep several hundred messages in your
           mailbox, then this function is not for you; see
           newmailp below.

newmailp[mailfile]

        -  A simplier version of newmailauthors which is only the
           predicate part of newmailauthors.  It just compares the
           read and write dates of mailfile (with the same
           defaults for mailfile as in newmailauthors) and returns
           T or NIL appropriately.

mailfilename[dirName]

        -  This function computes the name of the mailbox in the
           given directory (or your login mailbox if dirName is
           NIL or your connected mailbox if it is T).  This is
           used in conjuction with the functions newmailauthors
           and newmailp, but may be useful elsewhere.  It hides
           the differences between TENEX and TOPS20 mailboxs.

newmailblinkp[]

        -  If you have a CRT terminal that "blinks", highlights,
           etc.  (especially if it has windowing facilities) and
           want to use the specific terminal features to alert
           that new mail has arrived by either of the new mail
           functions above, one serious problem arises.  After
           being alerted via blinking that new mail has arrived
           (and possibly who sent it) and assuming you wish to
           continue working rather than reading your mail right
           away, you don't want the blinking to continue "too
           long" and keep disturbing you.  This function should be
           thought of as a "timer" function especially for the
           purpose of not being annoying about new mail; the first
           time it is called the timer starts and returns T and
           subsequent calls keep returning T until the timer runs
           out (with specific checks for "new" new mail in which
           case the timer restarts, or the fact that you haven't
           done anything at you terminal -- probably out for
           coffee or lunch).  Note:  it assumes you have
           determined you have new mail (usually via
           newmailauthors or newmailp).
 
           Using the variable MAILFILENAME and the writedate of
           you mailbox it determines whether you should still
           "blink" a new mail message to your terminal.  If
           BLINKMAILTIME (a global variable whose value is used as
           the number of minutes to "blink"; its initial value is
           1) time has passed since the first time you called this
           function with new mail and at least one input event has
           taken place at your terminal then return NIL, otherwise
           return T.  Therefore if you are away from your
           terminal, this function continues to return T even
           though the time has run out.

These functions provide the "guts" for a information package about
new mail.  You have to build your own system using them.

Martin D Yonke