1 07/18/86  memo
  2 
  3 Syntax as a command:  memo {-memo_options} memo_text
  4               or:  memo {-action_args} {-memo_options} {-selection_args}
  5 
  6 
  7 Syntax as an active function:  [memo memo_text]
  8                           or:  [memo -list {-totals}]
  9 
 10 
 11 Function: maintains a user-created reminder list in a memo segment,
 12 which is normally Person_ID.memo, in your home directory.
 13 
 14 
 15 Arguments:
 16 memo_text
 17    is the text of the memo being set.  It cannot be longer than 132
 18    characters.  You can specify it in one of two forms:
 19    STR
 20       is the string without an initial hyphen that begins the memo
 21       text.  No further arguments are accepted.
 22    -memo STRs
 23       treats all succeeding STRs as part of the memo text, whether or
 24       not they begin with hyphens.
 25 
 26 
 27 List of memo_options: Use these control arguments to control various
 28    options of the memo being set or to select memos being otherwise
 29    processed.
 30 -alarm, -al
 31    specifies that the memo is to be an alarm.  An alarm memo is
 32    printed, or executed if set with -call, when its timer goes off, if
 33    timers are enabled, rather than being explicitly processed.  It is
 34    deleted immediately after it reaches maturity, unless you supplied
 35    -retain.
 36 -call
 37    passes the memo text to the command processor as a command line when
 38    the memo matures, rather than printing it.
 39 -date DT, -dt DT
 40    identifies a date for the memo to mature.  DT is truncated to the
 41    midnight preceding the date in which DT falls.  (See "Notes" below.)
 42 
 43 
 44 -expires DT, -exp DT
 45    identifies the memo's expiring time; this is treated as a delta from
 46    the maturity time (which it must be greater than) so that repeating
 47    memos with expiration times work properly.  When used as a selection
 48    argument, all expiring memos are selected, regardless of the
 49    expiration dates.  (See "Notes" and "Notes on expiring memos"
 50    below.)
 51 -invisible, -iv
 52    specifies that the memo never be mature and never be printed during
 53    a normal memo print.
 54 -no_retain, -nret
 55    processes the memo only once and then deletes it.  (Default for
 56    alarm memos)
 57 
 58 
 59 -repeat DT, -rpt DT
 60    identifies the memo's repeat interval, where DT must be greater than
 61    or equal to one minute.  When the memo is reset, the new maturity
 62    time will be the next successive interval that matures in the
 63    future.  When used as a selection argument, all repeating memos are
 64    selected, regardless of the repeat intervals given.  (See "Notes"
 65    and "Notes on repeating memos.")
 66 -repeat_when_processed, -rwp
 67    specifies that the repeat time of a repeating memo be applied from
 68    the time the memo is processed, rather than from the maturity time.
 69 
 70 
 71 -retain, -ret
 72    keeps an alarm memo as an ordinary printing (or executing if set
 73    with -call) memo after it matures, rather than being deleted.
 74    (Default for nonalarm memos)
 75 -time DT, -tm DT
 76    identifies a time for the memo to mature (see "Notes").
 77 
 78 
 79 List of action_args: These control arguments control various memo
 80    options.  The -delete, -list, -postpone, -print, and -process
 81    actions are mutually exclusive.
 82 -brief, -bf
 83    does not print message "No memos."  if no memos are found.
 84 -delete {-force}, -dl {-fc}
 85    deletes all memos selected by the optional arguments.  You must
 86    explicitly supply at least one memo.  It queries you before deleting
 87    nonmature memos; however, with -force, it deletes memos--without
 88    querying you--even if they are not yet mature.
 89 
 90 
 91 -list, -ls
 92    prints text and control information of selected memos; no memos are
 93    executed.  If you don't explicitly select memos, all memos are
 94    listed.  If you also give -totals, only the total number of selected
 95    memos is printed.
 96 -off
 97    suppresses all memo alarms until the next memo command with no
 98    explicitly specified action.  You can combine -on and -off with
 99    other actions.
100 -on
101    enables memo alarms without printing or executing nonalarm memos.
102 -pathname -default, -pn -dft
103    resets the default memo segment to Person.ID.memo in your home
104    directory.
105 
106 
107 -pathname path, -pn path
108    changes the default memo segment to path if specified with no other
109    action; otherwise the memo segment specified by path is used for the
110    execution only of the current memo command.  If you supply -pathname
111    along with -on or -off, the default memo segment is changed and
112    alarms are turned on or off, as appropriate, for the new segment.
113    You need not give the suffix .memo.
114 -postpone DT, -pp DT
115    reschedules the maturity of the selected memos to the time specified
116    by DT, if DT is later than the current maturity time.  You must
117    explicitly provide at least one memo.  (See "Notes.")
118 -print, -pr
119    prints text of all selected memos.  No memos are executed.  If you
120    don't explicitly select memos, only mature memos are printed.
121 
122 
123 -process
124    causes all mature memos to be processed, and alarms to be turned on,
125    if not otherwise specified.  This is equivalent to explicitly
126    specifying no action.
127 -status, -st
128    prints information about the current default memo segment.  If you
129    specify it, it must be the only argument.
130 -totals, -tt
131    you can only use it together with -list.  When you give it, the
132    total number of memos selected is printed, rather than listing each
133    of the memos.
134 
135 
136 List of selection_args: These arguments are used to select memos to be
137    listed, printed, deleated, or postponed.  You can also use some
138    memo_options to specify types of memos to be selected (see "Notes").
139    When you supply more than one selection_args, only those memos that
140    match all the selection criteria are chosen.
141 memo_number
142    is either a positive decimal number specifying a single memo (e.g.,
143    32) or two such numbers separated by a colon, specifying a range of
144    memos (e.g., 12:16).
145 -from DT, -fm DT
146    selects all memos that mature on, or after, DT.  You can combine it
147    with -to, but specify each only once.  It is incompatible with -date
148    and -time.  (See "Notes.")
149 
150 
151 -match STR
152    specifies a string against which memo texts are matched to select
153    memos.  STR cannot be longer than 32 characters.  You can supply up
154    to 40 STRs; all memos that match at least one are selected.
155 -to DT
156    selects all memos that mature on, or before, DT.  This control
157    argument is incompatible with -date and -time.  (See "Notes.")
158 
159 
160 Notes: See time_strings.gi.
161 
162 No more than 5082 memos can be contained in a single memo segment.  An
163 individual memo can be no more than 132 characters long.
164 
165 If you explicitly specify no action and set no memo, all mature memos
166 are processed (printed or executed) and the alarm timer is turned on,
167 enabling the processing of alarm memos.
168 
169 You can use the memo_options to specify types of memos to be selected;
170 those that take a date/time interval (-repeat, -expires, but not -date
171 or -time) cause the selection of all repeating or expiring memos, as
172 the time interval (which you must specify) is ignored.
173 
174 
175 Notes on default memo segment: The memo command operates on the
176 default memo segment (unless -pathname is specified with one of the
177 actions -delete, -list, -postpone, -print or -process).  This default
178 memo segment is also used when processing alarm timers, to find the
179 memos which should be processed for the alarm.  If the default memo
180 segment has never been explicitly specified (by using -pathname without
181 any other actions), it is the segment Person_ID.memo in the user's home
182 directory.
183 
184 The default memo segment is created if it does not already exist.  If
185 the default memo segment is changed, alarms are turned off for the old
186 memo segment, and then turned on for the new one (if requested).  Thus,
187 only one memo segment can have alarms active at a time.
188 
189 
190 Notes on repeating memos: A repeating memo repeats by setting a new
191 memo that is identical to the original one, and then turning off the
192 repeat specification in the original memo.  Thus the actual repeating
193 memo, rather than its visible consequences, gets a new number each time
194 it repeats.  Since the repeat specification is turned off in the
195 original memo, it never repeats again, but remains until deleted,
196 unless it has an expiration date or was set with -no_retain.
197 
198 An alarm memo that repeats will mature once, and then be automatically
199 deleted, unless it was set with -retain, in which case it is turned
200 into an ordinary, non-alarm memo and lasts until it expires or is
201 deleted.
202 
203 
204 Notes on expiring memos: Expired memos are deleted without being
205 reprinted or executed.  However, if they are repeating memos, they are
206 repeated before being deleted.  This is useful for cases such as a
207 reminder of a weekly meeting, where the reminder of this week's meeting
208 should always be set, but the reminder of this week's meeting should
209 not be printed if the current time is after the end of this week's
210 meeting.  A sequence of repeating memos must be terminated manually (by
211 deleting the current memo); the -expires control argument is not useful
212 for this purpose.
213 
214 
215 Notes on active function: The memo active function can only be used to
216 set and list memos.  When a memo is set, the number assigned to the
217 newly set memo is returned.  When memos are listed, a string consisting
218 of the memo numbers selected, separated by spaces, is returned; if
219 -totals is specified, the total count is returned.