1 10/05/82  Enhancements to have_mail in MR10.1
 2 
 3 Several enhancements have been made to the have_mail command/active
 4 function in MR10.1.  These enhancements are:
 5    (1) an improved mailbox selection capability,
 6    (2) new message selection control arguments, and
 7    (3) the have_messages command/active function.
 8 
 9 
10 Enhanced mailbox selection:
11 The have_mail command/active function now uses the same interpretation
12 of non-control arguments that is used by print_mail and read_mail to
13 select a mailbox.  In addition, have_mail now supports the same
14 mailbox specification control arguments as print_mail and read_mail.
15 
16 This change, while slightly incompatible with prior releases, insures
17 that have_mail will not check a different mailbox than would be read by
18 print_mail or read_mail if they were given the same arguments.
19 
20 
21 For example, in prior releases, if the statement
22 
23       &if [have_mail Palter.Multics] &then read_mail Palter.Multics
24 
25 were placed into an exec_com, have_mail would check the contents of the
26 mailbox Palter.Multics.mbx in the working directory while read_mail
27 would attempt to read the default mailbox for the user Palter.Multics.
28 
29 
30 List of mailbox specifiers:
31 -mailbox path, -mbx path
32    specifies the pathname of a mailbox.  The suffix "mbx" is added if
33    necessary.
34 -user Person_id.Project_id
35    specifies the given user's default mailbox.  This control argument
36    is equivalent to:
37          -mailbox >udd>Project_id>Person_id>Person_id.mbx
38 -save path, -sv path
39    specifies the pathname of a savebox.  The suffix "sv.mbx" is added
40    if necessary.
41 -log
42    specifies the user's logbox and is equivalent to:
43          -mailbox >udd>Project_id>Person_id>Person_id.sv.mbx
44 
45 
46 STR
47    is any non-control argument and is first interpreted as:
48          -mailbox STR
49    if no mailbox is found, this specification is then interpreted as:
50          -save STR
51    if no savebox is found, this specification is then interpreted as:
52          -user STR
53 
54 
55 Message selection control arguments:
56 Several new control arguments have been added to have_mail.  These
57 control arguments dictate whether or not ordinary mail or interactive
58 messages should be ignored when deciding if a mailbox is empty.
59 
60 By default, have_mail checks for both ordinary mail and interactive
61 messages.  This default insures that have_mail and print_mail will
62 always agree on whether or not a mailbox is empty.
63 
64 
65 However, if the new -no_interactive_messages (-nim) control argument is
66 used, have_mail will only check for ordinary mail within a mailbox.
67 Use of this control arguments causes have_mail to agree with read_mail
68 rather than print_mail on whether or not a mailbox is empty.
69 
70 For example, the statement
71 
72       &if [have_mail -nim]
73 
74 may be placed in your start_up.ec to invoke read_mail only if there is
75 mail in your mailbox.
76 
77 
78 List of message selection control arguments:
79 -interactive_messages, -im
80    return "true" if there are any interactive messages in the mailbox.
81    (Default)
82 -no_interactive_messages, -nim
83    return "true" only if there is mail in the mailbox, ignoring whether
84    there are any interactive messages present.
85 -mail, -ml
86     return "true" if there is any mail in the mailbox.  (Default)
87 -no_mail, -nml
88    return "true" only if there are interactive messages in the mailbox,
89    ignoring whether there is any mail in the mailbox.
90 
91 
92 have_messages command/active function:
93 A new command, have_messages, has been added.  This command is
94 identical to have_mail except that, by default, it only checks the
95 mailbox for interactive messages.