source: release/1.6/source/cocoa-ide/hemlock/doc/user/mail.mss

Last change on this file was 6, checked in by Gary Byers, 21 years ago

Initial revision

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 63.8 KB
Line 
1@comment{-*- Dictionary: /afs/cs/project/clisp/scribe/hem/hem; Mode: spell; Package: Hemlock -*-}
2@chap[The Mail Interface]
3@section[Introduction to Mail in Hemlock]
4
5@index[MH interface]@label[introduction]
6@hemlock provides an electronic mail handling facility via an interface to the
7public domain @i[Rand MH Message Handling System]. This chapter assumes that
8the user is familiar with the basic features and operation of @mh, but it
9attempts to make allowances for beginners. Later sections of this chapter
10discuss setting up @mh, profile components and special files for formatting
11outgoing mail headers, and backing up protected mail directories on a
12workstation. For more information on @mh, see the @i[Rand MH Message Handling
13System Tutorial] and the @i[Rand MH Message Handling System Manual].
14
15The @hemlock interface to @mh provides a means for generating header (@f[scan])
16lines for messages and displaying these headers in a @hid[Headers] buffer.
17This allows the user to operate on the @i[current message] as indicated by the
18position of the cursor in the @hid[Headers] buffer. The user can read, reply
19to, forward, refile, or perform various other operations on the current
20message. A user typically generates a @hid[Headers] buffer with the commands
21@hid[Message Headers] or @hid[Incorporate and Read New Mail], and multiple such
22buffers may exist simultaneously.
23
24Reading a message places its text in a @hid[Message] buffer. In a manner
25similar to a @hid[Headers] buffer, this allows the user to operate on that
26message. Most @hid[Headers] buffer commands behave the same in a @hid[Message]
27buffer. For example, the @hid[Reply to Message] command has the same effect in
28both @hid[Headers] mode and @hid[Message] mode. It creates a @hid[Draft]
29buffer and makes it the current buffer so that the user may type a reply to the
30current message.
31
32The @hid[Send Message] command originates outgoing mail. It generates a
33@hid[Draft] buffer in which the user composes a mail message. Each @hid[Draft]
34buffer has an associated pathname, so the user can save the buffer to a file as
35necessary. Invoking @hid[Send Message] in a @hid[Headers] or @hid[Message]
36buffer associates the @hid[Draft] buffer with a @hid[Message] buffer. This
37allows the user to easily refer to the message being replied to with the
38command @hid[Goto Message Buffer]. After the user composes a draft message, he
39can deliver the message by invoking the @hid[Deliver Message] command in the
40@hid[Draft] buffer (which deletes both the this buffer and any associated
41@hid[Message] buffer), or he can delay this action. Invoking @hid[Deliver
42Message] when not in a @hid[Draft] buffer causes it to prompt for a draft
43message ID, allowing previously composed and saved messages to be delivered
44(even across distinct Lisp invocations).
45
46@index[virtual message deletion]
47The @hemlock mail system provides a mechanism for @i[virtual message deletion].
48That is, the @hid[Delete Message] command does not immediately delete a message
49but merely flags the message for future deletion. This allows the user to
50undelete the messages with the @hid[Undelete Message] command. The
51@hid[Expunge Messages] command actually removes messages flagged for deletion.
52After expunging a deleted message, @hid[Undelete Messages] can no longer
53retrieve it. Commands that read messages by sequencing through a @hid[Headers]
54buffer typically ignore those marked for deletion, which makes for more fluid
55reading if a first pass has been made to delete uninteresting messages.
56
57After handling messages in a @hid[Headers] buffer, there may be messages
58flagged for deletion and possibly multiple @hid[Message] buffers lying around.
59There is a variety of commands that help @i[terminate] a mail session.
60@hid[Expunge Messages] will flush the messages to be deleted, leaving the
61buffer in an updated state. @hid[Delete Headers Buffer and Message Buffers]
62will delete the @hid[Headers] buffer and its corresponding @hid[Message]
63buffers. @hid[Quit Headers] is a combination of these two commands in that it
64first expunges messages and then deletes all the appropriate buffers.
65
66One does not have to operate only on messages represented in a @hid[Headers]
67buffer. This is merely the nominal mode of interaction. There are commands
68that prompt for a folder, an @mh message specification (for example, "@f[1 3 6
69last]", "@f[1-3 5 6]", "@f[all]", "@f[unseen]"), and possibly a @f[pick]
70expression. @f[Pick] expressions allow messages to be selected based on header
71field pattern matching, body text searching, and date comparisons; these can be
72specified using either a Unix shell-like/switch notation or a Lisp syntax,
73according to one's preference. See section @ref[scanning] for more details.
74
75A @i[mail-drop] is a file where a Unix-based mail system stores all messages a
76user receives. The user's mail handling program then fetches these from the
77mail-drop, allowing the user to operate on them. Traditionally one locates his
78mail-drop and mail directory on a mainframe machine because the information on
79mainframes is backed up on magnetic tape at least once per day. Since @hemlock
80only runs under CMU @clisp on workstations, and one's mail directory is not
81usually world writable, it is not possible to adhere to a standard arrangement.
82Since @mh provides for a remote mail-drop, and CMU's Remote File System has a
83feature allowing authentication across a local area network, one can use
84@hemlock to fetch his mail from a mainframe mail-drop (where it is backed up
85before @hemlock grabs it) and store it on his workstation. Reading mail on a
86workstation is often much faster and more comfortable because typically it is a
87single user machine. Section @ref[backing-up] describes how to back up one's
88mail directory from a workstation to a mainframe.
89
90
91@section[Constraints on MH to use Hemlock's Interface]
92
93@index[constraints for mail interface]@label[constraints]
94There are a couple constaints placed on the user of the @hemlock interface to
95@mh. The first is that there must be a draft folder specified in one's @mh
96profile to use any command that sends mail. Also, to read new mail, there must
97be an @f[Unseen-Sequence:] component in one's @mh profile. The default @mh
98profile does not specify these components, so they must be added by the user.
99The next section of this chapter describes how to add these components.
100Another constraint is that @hemlock requires its own @f[scan] line format to
101display headers lines in a @hid[Headers] buffer. See the description of the
102variable @hid[MH Scan Line Form] for details.
103
104
105@section[Setting up MH]
106
107@index[setting up the mail interface]@label[setting-up]
108@index[mail profile]@index[MH profile]
109Get an @mh default profile and mail directory by executing the @mh @f[folder]
110utility in a Unix shell. When it asks if it should make the "@f[inbox]"
111folder, answer "@b[yes]". This creates a file called "@f[.mh_profile]" in the
112user's home directory and a directory named "@f[Mail]".
113
114Edit the "@f[.mh_profile]" file inserting two additional lines. To send mail
115in @hemlock, the user must indicate a draft folder by adding a
116@f[Draft-Folder:] line with a draft folder name @dash "@f[drafts]" is a common
117name:
118@begin[example]
119Draft-Folder: drafts
120@end[example]
121
122Since the mail-drop exists on a remote machine, the following line must
123also be added:
124@begin[example]
125MailDrop: /../<hostname>/usr/spool/mail/<username>
126@end[example]
127
128Since the user's mail-drop is on a separate machine from his mail directory
129(and where the user runs @hemlock), it is necessary to issue the following
130command from the Unix shell (on the workstation). This only needs to be done
131once.
132@begin[programexample]
133/usr/cs/etc/rfslink -host <hostname> /usr/spool/mail/<username>
134@end[programexample]
135Note that @b[<hostname>] is not a full ARPANET domain-style name. Use an
136abbreviated CMU host name (for example, "@b[spice]" not
137"@b[spice.cs.cmu.edu]").
138
139
140@section[Profile Components and Customized Files]
141
142@subsection[Profile Components]
143
144@label[Profile]
145The following are short descriptions about profile components that are either
146necessary to using @hemlock@comment{}'s interface to @mh or convenient for using @mh in
147general:
148
149@begin[description]
150@f[Path:]@\
151This specifies the user's mail directory. It can be either a full pathname or
152a pathname relative to the user's home directory. This component is
153@i[necessary] for using @mh.
154
155@f[MailDrop:]@\
156This is used to specify one's remote mail-drop. It is @i[necessary] for
157@hemlock only when using a mail-drop other than "@f[/usr/spool/mail/<user>]" on
158the local machine.
159
160@f[Folder-Protect:], @f[Msg-Protect:]@\
161These are set to 700 and 600 respectively to keep others from reading one's
162mail. At one time the default values were set for public visibility of mail
163folders. Though this is no longer true, these can be set for certainty. The
164700 protection allows only user read, write, and execute (list access for
165directories), and 600 allows only user read and write. These are not necessary
166for either @mh or the @hemlock interface.
167
168@f[Unseen-Sequence:]@\
169When mail is incorporated, new messages are added to this sequence, and as
170these messages are read they are removed from it. This allows the user at any
171time to invoke an @mh program on all the unseen messges of a folder easily. An
172example definition is:
173@begin[example]
174Unseen-Sequence: unseen
175@end[example]
176Specifying an unseen-sequence is @i[necessary] to use @hemlock@comment{}'s
177interface to @mh.
178
179@f[Alternate-Mailboxes:]@\
180This is not necessary for either @mh or the @hemlock interface. This
181component tells @mh which addresses that it should recognize as the user. This
182is used for @f[scan] output formatting when the mail was sent by the user. It
183is also used by @f[repl] when it sets up headers to know who the user is for
184inclusion or exclusion from @b[cc]: lists. This is case sensitive and takes
185wildcards. One example is:
186@begin[example]
187Alternate-Mailboxes: *FRED*, *Fred*, *fred*
188@end[example]
189
190@f[Draft-Folder:]@\
191This makes multiple draft creation possible and trivial to use. Just supply a
192folder name (for example, "@f[drafts]"). Specifying a draft-folder is
193@i[necessary] to use @hemlock@comment{}'s interface to @mh.
194
195@f[repl: -cc all -nocc me -fcc out-copy]@\
196This tells the @f[repl] utility to include everyone but the user in the
197@b[cc:] list when replying to mail. It also makes @f[repl] keep an copy of the
198message the user sends. This is mentioned because one probably wants to reply
199to everyone receiving a piece of mail except oneself. Unlike other utilities
200that send mail, @f[repl] stores personal copies of outgoing mail based on a
201command line switch. Other @mh utilities use different mechanisms. This line
202is not necessary to use either @mh or the @hemlock interface.
203
204@f[rmmproc: /usr/cs/bin/rm]@\
205This is not necessary to use @hemlock@comment{}'s interface to @mh, but due to
206@hemlock@comment{}'s virtual message deletion feature, this causes messages to be deleted
207from folder directories in a cleaner fashion when they actually get removed.
208Note that setting this makes @f[rmm] more treacherous if used in the Unix
209shell.
210@end[description]
211@;
212
213
214@subsection[Components Files]
215@index[components]
216@label[components-files]
217@i[Components] files are templates for outgoing mail header fields that specify
218position and sometimes values for specified fields. Example files are shown
219for each one discussed here. These should exist in the user's mail directory.
220
221For originating mail there is a components file named "@f[components]", and it
222is used by the @mh utility @f[comp]. An example follows:
223@begin[example]
224 To:
225 cc:
226 fcc: out-copy
227 Subject:
228 --------
229@end[example]
230This example file differs from the default by including the @f[fcc:] line.
231This causes @mh to keep a copy of the outgoing draft message. Also, though it
232isn't visible here, the @f[To:], @f[cc:], and @f[Subject:] lines have a space
233at the end.
234
235@index[forwarding components]
236The "@f[forwcomps]" components file is a template for the header fields of any
237forwarded message. Though it may be different, our example is the same as the
238previous one. These are distinct files for @mh@comment{}'s purposes, and it is more
239flexible since the user might not want to keep copies of forwarded messages.
240
241@index[reply components]
242The "@f[replcomps]" components file is a template for the header fields of any
243draft message composed when replying to a message. An example
244follows:
245@begin[example]
246 %(lit)%(formataddr %<{reply-to}%|%<{from}%|%{sender}%>%>)\
247 %<(nonnull)%(void(width))%(putaddr To: )\n%>\
248 %(lit)%(formataddr{to})%(formataddr{cc})%(formataddr(me))\
249 %(formataddr{resent-to})\
250 %<(nonnull)%(void(width))%(putaddr cc: )\n%>\
251 %<{fcc}Fcc: %{fcc}\n%>\
252 %<{subject}Subject: Re: %{subject}\n%>\
253 %<{date}In-reply-to: Your message of \
254 %<(nodate{date})%{date}%|%(tws{date})%>.%<{message-id}
255 %{message-id}%>\n%>\
256 --------
257@end[example]
258This example file differs from the default by including the @b[resent-to:]
259field (in addition to the @b[to:] and @b[cc:] fields) of the message being
260replied to in the @b[cc:] field of the draft. This is necessary for replying
261to all recipients of a distributed message. Keeping a copy of the outgoing
262draft message works a little differently with reply components. @mh expects a
263switch which the user can put in his profile (see section @ref[Profile] of this
264chapter), and using the @mh formatting language, this file tests for the
265@f[fcc] value as does the standard file.
266
267
268@section[Backing up the Mail Directory]
269@index[backing up mail directories]
270@label[backing-up]
271The easiest method of backing up a protected mail directory is to copy it into
272an Andrew File System (AFS) directory since these are backed up daily as with
273mainframes. The only problem with this is that the file servers may be down
274when one wants to copy his mail directory since, at the time of this writing,
275these servers are still under active development; however, they are becoming
276more robust daily. One can read about the current AFS status in the file
277@f[/../fac/usr/gripe/doc/vice/status].
278
279Using AFS, one could keep his actual mail directory (not a copy thereof) in his
280AFS home directory which eliminates the issue of backing it up. This is
281additionally beneficial if the user does not use the same workstation everyday
282(that is, he does not have his own but shares project owned machines). Two
283problems with this arrangement result from the AFS being a distributed file
284system. Besides the chance that the server will be down when the user wants to
285read mail, performance degrades since messages must always be referenced across
286the local area network.
287
288Facilities' official mechanism for backing up protected directories is called
289@f[sup]. This is awkward to use and hard to set up, but a subsection here
290describes a particular arrangement suitable for the user's mail directory.
291
292
293@subsection[Andrew File System]
294If the user choses to use AFS, he should get copies of @i[Getting Started with
295the Andrew File System] and @i[Protecting AFS files and directories]. To use
296AFS, send mail to Gripe requesting an account. When Gripe replies with a
297password, change it to be the same as the account's password on the
298workstation. This causes the user to be authenticated into AFS when he logs
299into his workstation (that is, he is automatically logged into his AFS
300account). To change the password, first log into the AFS account:
301@begin[programexample]
302log <AFS userid>
303@end[programexample]
304Then issue the @f[vpasswd] command.
305
306All of the example command lines in this section assume the user has
307@f[/usr/misc/bin] on his Unix shell @f[PATH] environment variable.
308
309@paragraph[Copy into AFS:]
310
311Make an AFS directory to copy into:
312@begin[programexample]
313mkdir /afs/cs.cmu.edu/user/<AFS userid>/mail-backup
314@end[programexample]
315
316This will be readable by everyone, so protect it with the following:
317@begin[programexample]
318fs sa /afs/cs.cmu.edu/user/<AFSuserid>/mail-backup System:AnyUser none
319@end[programexample]
320
321Once the AFS account and directory to backup into have been established, the
322user needs a means to recursively copy his mail directory updating only those
323file that have changed and deleting those that no longer exist. To do this,
324issue the following command:
325@begin[programexample]
326copy -2 -v -R <mail directory> <AFS backup directory>
327@end[programexample]
328Do not terminate either of these directory specifications with a @f[/]. The
329@f[-v] switch causes @f[copy] to output a line for copy and deletion, so this
330may be eliminated if the user desires.
331
332@paragraph[Mail Directory Lives in AFS:]
333
334Assuming the AFS account has been established, and the user has followed the
335directions in @ref[setting-up], now make an AFS directory to serve as the mail
336directory:
337@begin[programexample]
338mkdir /afs/cs.cmu.edu/user/<AFS userid>/Mail
339@end[programexample]
340
341This will be readable by everyone, so protect it with the following:
342@begin[programexample]
343fs sa /afs/cs.cmu.edu/user/<AFSuserid>/Mail System:AnyUser none
344@end[programexample]
345
346Tell @mh where the mail directory is by modifying the profile's
347"@f[.mh_profile]" (see section @ref[setting-up]) @f[Path:] component (see
348section @ref[Profile]):
349@begin[programexample]
350Path: /afs/cs.cmu.edu/user/<AFS userid>/Mail
351@end[programexample]
352
353
354@subsection[Sup to a Mainframe]
355To use @f[sup] the user must set up a directory named "@f[sup]" on the
356workstation in the user's home directory. This contains different directories
357for the various trees that will be backed up, so there will be a "@f[Mail]"
358directory. This directory will contain two files: "@f[crypt]" and "@f[list]".
359The "@f[crypt]" file contains one line, terminated with a new line, that
360contains a single word @dash an encryption key. "@f[list]" contains one line,
361terminated with a new line, that contains two words @dash "@b[upgrade Mail]".
362
363On the user's mainframe, a file must be created that will be supplied to the
364@f[sup] program. It should contain the following line to backup the mail
365directory:
366
367@begin[example]
368Mail delete host=<workstation> hostbase=/usr/<user> base=/usr/<user> \
369crypt=WordInCryptFile login=<user> password=LoginPasswordOnWorkstation
370@end[example]
371Warning: @i[This file contains the user's password and should be
372protected appropriately.]
373
374The following Unix shell command issued on the mainframe will backup the
375mail directory:
376
377@begin[programexample]
378 sup <name of the sup file used in previous paragraph>
379@end[programexample]
380
381As a specific example, assume user "@f[fred]" has a workstation called
382"@f[fred]", and his mainframe is the "@f[gpa]" machine where he has another
383user account named "@f[fred]". The password on his workstation is
384"@f[purple]". On his workstation, he creates the directory
385"@f[/usr/fred/sup/Mail/]" with the two files "@f[crypt]" and "@f[list]".
386The file "@f[/usr/fred/sup/Mail/crypt]" contains only the encryption key:
387@programexample[steppenwolf]
388The file "@f[/usr/fred/sup/Mail/list]" contains the command to upgrade the
389"@f[Mail]" directory:
390@programexample[upgrade Mail]
391
392On the "@f[gpa]" machine, the file "@f[/usr/fred/supfile]" contains the
393following line:
394@begin[programexample]
395Mail delete host=fred hostbase=/usr/fred base=/usr/fred \
396crypt=steppenwolf login=fred password=purple
397@end[programexample]
398This file is protected on "@f[gpa]", so others cannot see @f[fred's] password
399on his workstation.
400
401On the gpa-vax, issuing
402@begin[programexample]
403 sup /usr/fred/supfile
404@end[programexample]
405to the Unix shell will update the @mh mail directory from @f[fred's]
406workstation deleting any files that exist on the gpa that do not exist on the
407workstation.
408
409For a more complete description of the features of @f[sup], see the @i[UNIX
410Workstation Owner's Guide] and @i[The SUP Software Upgrade Protocol].
411
412@section[Introduction to Commands and Variables]
413
414@index[mail commands]@index[mail variables]@label[mhcommands]
415Unless otherwise specified, any command which prompts for a folder name will
416offer the user a default. Usually this is @mh@comment{}'s idea of the current folder,
417but sometimes it is the folder name associated with the current buffer if there
418is one. When prompting for a message, any valid @mh message expression may be
419entered (for example, "@f[1 3 6]", "@f[1-3 5 6]", "@f[unseen]", "@f[all]").
420Unless otherwise specified, a default will be offered (usually the current
421message).
422
423Some commands mention specific @mh utilities, so the user knows how the
424@hemlock command affects the state of @mh and what profile components and
425special formatting files will be used. @hemlock runs the @mh utility programs
426from a directory indicated by the following variable:
427
428@defhvar[var "MH Utility Pathname", val {"/usr/misc/.mh/bin/"}]
429@mh utility names are merged with this pathname to find the executable
430files.
431@enddefhvar
432
433
434@section[Scanning and Picking Messages]
435@label[scanning]
436As pointed out in the introduction of this chapter, users typically generate
437headers or @f[scan] listings of messages with @hid[Message Headers], using
438commands that operate on the messages represented by the headers. @hid[Pick
439Headers] (bound to @bf[h] in @hid[Headers] mode) can be used to narrow down (or
440further select over) the headers in the buffer.
441
442A @f[pick] expression may be entered using either a Lisp syntax or a Unix
443shell-like/switch notation as described in the @mh documentation. The Lisp
444syntax is as follows:
445
446@begin[example]
447 <exp> ::= {(not <exp>) | (and <exp>*) | (or <exp>*)
448 | (cc <pattern>) | (date <pattern>)
449 | (from <pattern>) | (search <pattern>)
450 | (subject <pattern>) | (to <pattern>)
451 | (-- <component> <pattern>)
452 | (before <date>) | (after <date>)
453 | (datefield <field>)}
454
455 <pattern> ::= {<string> | <symbol>}
456
457 <component> ::= {<string> | <symbol>}
458
459 <date> ::= {<string> | <symbol> | <number>}
460
461 <field> ::= <string>
462@end[example]
463
464Anywhere the user enters a @f[<symbol>], its symbol name is used as a string.
465Since @hemlock @f[read]s the expression without evaluating it, single quotes
466("@bf[']") are unnecessary. From the @mh documentation,
467
468@begin[itemize]
469 A @f[<pattern>] is a Unix @f[ed] regular expression. When using a string to
470 input these, remember that @f[\] is an escape character in Common Lisp.
471
472 A @f[<component>] is a header field name (for example, @b[reply-to] or
473 @b[resent-to]).
474
475 A @f[<date>] is an @i[822]-style specification, a day of the week,
476 "@b[today]", "@b[yesterday]", "@b[tomorrow]", or a number indicating @i[n]
477 days ago. The @i[822] standard is basically:
478 @begin[example]
479 dd mmm yy hh:mm:ss zzz
480 @end[example]
481 which is a two digit day, three letter month (first letter capitalized), two
482 digit year, two digit hour (@f[00] through @f[23]), two digit minute, two
483 digit second (this is optional), and a three letter zone (all capitalized).
484 For
485 example:
486 @begin[example]
487 21 Mar 88 16:00 EST
488 @end[example]
489
490 A @f[<field>] is an alternate @f[Date:] field to use with @f[(before
491 <date>)] and @f[(after <date>)] such as @f[BB-Posted:] or
492 @f[Delivery-Date:].
493
494 Using @f[(before <date>)] and @f[(after <date>)] causes date field parsing,
495 while @f[(date <pattern>)] does string pattern matching.
496@end[itemize]
497
498Since a @f[<pattern>] may be a symbol or string, it should be noted that the
499symbol name is probably all uppercase characters, and @mh will match these
500only against upper case. @mh will match lowercase characters against lower
501and upper case. Some examples are:
502@begin[example]
503 ;;; All messages to Gripe.
504 (to "gripe")
505
506 ;;; All messages to Gripe or about Hemlock.
507 (or (to "gripe") (subject "hemlock"))
508
509 ;;; All messages to Gripe with "Hemlock" in the body.
510 (and (to "gripe") (search "hemlock"))
511@end[example]
512
513Matching of @f[<component>] fields is case sensitive, so this example will
514@f[pick] over all messages that have been replied to.
515@example[(or (-- "replied" "") (-- "Replied" ""))]
516
517
518@defhvar[var "MH Scan Line Form", val {"library:mh-scan"}]
519This is a pathname of a file containing an @mh format expression used for
520header lines.
521
522The header line format must display the message ID as the first non-whitespace
523item. If the user uses the virtual message deletion feature which is on by
524default, there must be a space three characters to the right of the message ID.
525This location is used on header lines to note that a message is flagged for
526deletion. The second space after the message ID is used for notating answered
527or replied-to messages.
528@enddefhvar
529
530@defcom[com "Message Headers", bind (C-x r)]
531This command prompts for a folder, message (defaulting to "@b[all]"), and an
532optional @f[pick] expression. Typically this will simply be used to generate
533headers for an entire folder or sequence, and the @f[pick] expression will not
534be used. A new @hid[Headers] buffer is made, and the output of @f[scan] on the
535messages indicated is inserted into the buffer. The current window is used,
536the buffer's point is moved to the first header, and the @hid[Headers] buffer
537becomes current. The current value of the @hemlock @hid[Fill Column] variable
538is supplied to @f[scan] as the @f[-width] switch. The buffer name is set to a
539string of the form @w<"@f[Headers <folder> <msgs> <pick expression>]">, so the
540modeline will show what is in the buffer. If no @f[pick] expression was
541supplied, none will be shown in the buffer's name. As described in the
542introduction to this section, the expression may be entered using either a Lisp
543syntax or a Unix shell-like/switch notation.
544@enddefcom
545
546@defhvar[var "MH Lisp Expression", val {t}]
547When this is set, @mh expression prompts are read in a Lisp syntax. Otherwise,
548the input is of the form of a Unix shell-like/switch notation as described in
549the @mh documentation.
550@enddefhvar
551
552@defcom[com "Pick Headers", stuff (bound to @bf[h] in @hid[Headers] mode) ]
553This command is only valid in a @hid[Headers] buffer. It prompts for a
554@f[pick] expression, and the messages shown in the buffer are supplied to
555@f[pick] with the expression. The resulting messages are @f[scan]'ed, deleting
556the previous contents of the buffer. The current value of @hid[Fill Column] is
557used for the @f[scan]'ing. The buffer's point is moved to the first header.
558The buffer's name is set to a string of the form @w<"@f[Headers <folder> <msgs
559picked over> <pick expression>]">, so the modeline will show what is in the
560buffer. As described in the introduction to this section, the expression may
561be entered using either a Lisp syntax or a Unix shell-like/switch notation.
562@enddefcom
563
564@defcom[com "Headers Help", bind (Headers: ?)]
565This command displays documentation on @hid[Headers] mode.
566@enddefcom
567
568
569@section[Reading New Mail]
570
571@index[reading new mail]@label[reading-new-mail]
572
573@defcom[com "Incorporate and Read New Mail", stuff (bound to @bf[C-x i] globally and @bf[i] in @hid[Headers] and @hid[Message] modes) ]
574This command incorporates new mail into @hid[New Mail Folder] and creates a
575@hid[Headers] buffer with the new messages. An unseen-sequence must be define
576in the user's @mh profile to use this. Any headers generated due to
577@hid[Unseen Headers Message Spec] are inserted as well. The buffer's point is
578positioned on the headers line representing the first unseen message of the
579newly incorporated mail.
580@enddefcom
581
582@defcom[com "Incorporate New Mail" ]
583This command incorporates new mail into @hid[New Mail Folder], displaying
584@f[inc] output in a pop-up window. This is similar to @hid[Incorporate and
585Read New Mail] except that no @hid[Headers] buffer is generated.
586@enddefcom
587
588@defhvar[var "New Mail Folder", val {"+inbox"}]
589This is the folder into which @mh incorporates new mail.
590@enddefhvar
591
592@defhvar[var "Unseen Headers Message Spec", val {nil}]
593This is an @mh message specification that is suitable for any message prompt.
594When incorporating new mail and after expunging messages, @hemlock uses this
595specification in addition to the unseen-sequence name that is taken from the
596user's @mh profile to generate headers for the unseen @hid[Headers] buffer.
597This value is a string.
598@enddefhvar
599
600@defhvar[var "Incorporate New Mail Hook", val {nil}]
601This is a list of functions which are invoked immediately after new mail is
602incorporated. The functions should take no arguments.
603@enddefhvar
604
605@defhvar[var "Store Password", val {nil}]
606When this is set, the user is only prompted once for his password, and the
607password is stored for future use.
608@enddefhvar
609
610@defhvar[var "Authenticate Incorporation", val {nil}]
611@defhvar1[var "Authentication User Name", val {nil}]
612When @hid[Authenticate Incorporation] is set, incorporating new mail prompts
613for a password to access a remote mail-drop.
614
615When incorporating new mail accesses a remote mail-drop, @hid[Authentication
616User Name] is the user name supplied for authentication on the remote machine.
617If this is @nil, @hemlock uses the local name.
618@enddefhvar
619
620
621@section[Reading Messages]
622@index[reading messages]
623@label[reading-messages]
624This section describes basic commands that show the current, next, and previous
625messages, as well as a couple advanced commands. @hid[Show Message] (bound to
626@bf[SPACE] in @hid[Headers] mode) will display the message represented by the
627@f[scan] line the @hemlock cursor is on. Deleted messages are considered
628special, and the more conveniently bound commands for viewing the next and
629previous messages (@hid[Next Undeleted Message] bound to @bf[n] and
630@hid[Previous Undeleted Message] bound to @bf[p], both in @hid[Headers] and
631@hid[Message] modes) will ignore them. @hid[Next Message] and @hid[Previous
632Message] (bound to @bf[M-n] and @bf[M-p] in @hid[Headers] and @hid[Message]
633modes) may be invoked if reading a message is desired regardless of whether it
634has been deleted.
635
636
637@defcom[com "Show Message", stuff (bound to @bf[SPACE] and @bf[.] in @hid[Headers] mode) ]
638 This command, when invoked in a @hid[Headers] buffer, displays the current
639message (the message the cursor is on), by replacing any previous message that
640has not been preserved with @hid[Keep Message]. The current message is also
641removed from the unseen sequence. The @hid[Message] buffer becomes the current
642buffer using the current window. The buffer's point will be moved to the
643beginning of the buffer, and the buffer's name will be set to a string of the
644form @w<"@f[Message <folder> <msg-id>]">.
645
646The @hid[Message] buffer is read-only and may not be modified. The command
647@hid[Goto Headers Buffer] issued in the @hid[Message] buffer makes the
648associated @hid[Headers] buffer current.
649
650When not in a @hid[Headers] buffer, this command prompts for a folder and
651message. A unique @hid[Message] buffer is obtained, and its name is set to a
652string of the form @w<"@f[Message <folder> <msg-id>]">. The buffer's point is
653moved to the beginning of the buffer, and the current window is used to display
654the message.
655
656Specifying multiple messages inserts all the messages into the same buffer. If
657the user wishes to show more than one message, it is expected that he will
658generate a @hid[headers] buffer with the intended messages, and then use the
659message sequencing commands described below.
660@enddefcom
661
662@defcom[com "Next Message", stuff (bound to @bf[M-n] in @hid[Headers] and @hid[Message] modes) ]
663 This command is only meaningful in a @hid[Headers] buffer or a @hid[Message]
664buffer associated with a @hid[Headers] buffer. In a @hid[Headers] buffer, the
665point is moved to the next message, and if there is one, it is shown as
666described in the @hid[Show Message] command.
667
668In a @hid[Message] buffer, the message after the currently visible message is
669displayed. This clobbers the buffer's contents. Note, if the @hid[Message]
670buffer is associated with a @hid[Draft] buffer, invoking this command breaks
671that association. Using @hid[Keep Message] preserves the @hid[Message] buffer
672and any association with a @hid[Draft] buffer.
673
674The @hid[Message] buffer's name is set as described in the @hid[Show Message]
675command.
676@enddefcom
677
678@defcom[com "Previous Message", stuff (bound to @bf[M-p] in @hid[Headers] and @hid[Message] modes) ]
679 This command is only meaningful in a @hid[Headers] buffer or a @hid[Message]
680buffer associated with a @hid[Headers] buffer. In a @hid[Headers] buffer, the
681point is moved to the previous message, and if there is one, it is shown as
682described in the @hid[Show Message] command.
683
684In a @hid[Message] buffer, the message before the currently visible message is
685displayed. This clobbers the buffer's contents. Note, if the @hid[Message]
686buffer is associated with a @hid[Draft] buffer, invoking this command breaks
687that association. Using @hid[Keep Message] preserves the @hid[Message] buffer
688and any association with a @hid[Draft] buffer.
689
690The @hid[Message] buffer's name is set as described in the @hid[Show Message]
691command.
692@enddefcom
693
694@defcom[com "Next Undeleted Message", stuff (bound to @bf[n] in @hid[Headers] and @hid[Message] modes) ]
695 This command is only meaningful in a @hid[Headers] buffer or a @hid[Message]
696buffer associated with a @hid[Headers] buffer. In a @hid[Headers] buffer, the
697point is moved to the next undeleted message, and if there is one, it is shown
698as described in the @hid[Show Message] command.
699
700In a @hid[Message] buffer, the first undeleted message after the currently
701visible message is displayed. This clobbers the buffer's contents. Note, if
702the @hid[Message] buffer is associated with a @hid[Draft] buffer, invoking this
703command breaks that association. The @hid[Keep Message] command preserves the
704@hid[Message] buffer and any association with a @hid[Draft] buffer.
705
706The @hid[Message] buffer's name is set as described in the @hid[Show Message]
707command.
708@enddefcom
709
710@defcom[com "Previous Undeleted Message", stuff (bound to @bf[p] in @hid[Headers] and @hid[Message] modes) ]
711 This command is only meaningful in a @hid[Headers] buffer or a @hid[Message]
712buffer associated with a @hid[Headers] buffer. In a @hid[Headers] buffer, the
713point is moved to the previous undeleted message, and if there is one, it is
714shown as described in the @hid[Show Message] command.
715
716In a @hid[Message] buffer, the first undeleted message before the currently
717visible message is displayed. This clobbers the buffer's contents. Note, if
718the @hid[Message] buffer is associated with a @hid[Draft] buffer, invoking this
719command breaks that association. The @hid[Keep Message] command preserves the
720@hid[Message] buffer and any association with a @hid[Draft] buffer.
721
722The @hid[Message] buffer's name is set as described in the @hid[Show Message]
723command.
724@enddefcom
725
726@defcom[com "Scroll Message", stuff (bound to @bf[SPACE] and @bf[C-v] in @hid[Message] mode) ]
727@defhvar1[var "Scroll Message Showing Next", val {t}]
728 This command scrolls the current window down through the current message. If
729the end of the message is visible and @hid[Scroll Message Showing Next] is not
730@nil, then show the next undeleted message.
731@enddefcom
732
733@defcom[com "Keep Message" ]
734This command can only be invoked in a @hid[Message] buffer. It causes the
735@hid[Message] buffer to continue to exist when the user invokes commands to
736view other messages either within the kept @hid[Message] buffer or its
737associated @hid[Headers] buffer. This is useful for getting two messages into
738different buffers. It is also useful for retaining @hid[Message] buffers which
739would otherwise be deleted when an associated draft message is delivered.
740@enddefcom
741
742@defcom[com "Message Help", bind (Message: ?)]
743This command displays documentation on @hid[Message] mode.
744@enddefcom
745
746
747@section[Sending Messages]
748@index[sending messages]
749@label[sending-messages]
750The most useful commands for sending mail are @hid[Send Message] (bound to
751@bf[m] and @bf[s] in @hid[Headers] and @hid[Message] modes), @hid[Reply to
752Message] (bound to @bf[r] in @hid[Headers] mode), and @hid[Reply to Message in
753Other Window] (bound to @bf[r] in @hid[Message] mode). These commands set up a
754@hid[Draft] buffer and associate a @hid[Message] buffer with the draft when
755possible. To actually deliver the message to its recipient(s), use
756@hid[Deliver Message] (bound to @bf[H-s] in @hid[Draft] mode). To abort
757sending mail, use @hid[Delete Draft and Buffer] (bound to @bf[H-q] in
758@hid[Draft] mode). If one wants to temporarily stop composing a draft with the
759intention of finishing it later, then the @hid[Save File] command (bound to
760@bf[C-x C-s]) will save the draft to the user's draft folder.
761
762@hid[Draft] buffers have a special @hemlock minor mode called @hid[Draft] mode.
763The major mode of a @hid[Draft] buffer is taken from the @hid[Default Modes]
764variable. The user may wish to arrange that @hid[Text] mode (and possibly
765@hid[Fill] mode or @hid[Save] mode) be turned on whenever @hid[Draft] mode is
766set. For a further description of how to manipulate modes in @hemlock see the
767@i[Hemlock Command Implementor's Manual].
768
769
770@defcom[com "Send Message", stuff (bound to @bf[s] and @bf[m] in @hid[Headers] and @hid[Message] modes and @bf[C-x m] globally) ]
771 This command, when invoked in a @hid[Headers] buffer, creates a unique
772@hid[Draft] buffer and a unique @hid[Message] buffer. The current message is
773inserted in the @hid[Message] buffer, and the @hid[Draft] buffer is displayed
774in the current window. The @hid[Draft] buffer's point is moved to the end of
775the line containing @f[To:] if it exists. The name of the draft message file
776is used to produce the buffer's name. A pathname is associated with the
777@hid[Draft] buffer so that @hid[Save File] can be used to incrementally save a
778composition before delivering it. The @f[comp] utility will be used to
779allocate a draft message in the user's @mh draft folder and to insert the
780proper header components into the draft message. Both the @hid[Draft] and
781@hid[Message] buffers are associated with the @hid[Headers] buffer, and the
782@hid[Draft] buffer is associated with the @hid[Message] buffer.
783
784When invoked in a @hid[Message] buffer, a unique @hid[Draft] buffer is created,
785and these two buffers are associated. If the @hid[Message] buffer is
786associated with a @hid[Headers] buffer, this association is propagated to the
787@hid[Draft] buffer. Showing other messages while in this @hid[Headers] buffer
788will not affect this @hid[Message] buffer.
789
790When not in a @hid[Headers] or @hid[Message] buffer, this command does the same
791thing as described in the previous two cases, but there are no @hid[Message] or
792@hid[Headers] buffer manipulations.
793
794@hid[Deliver Message] will deliver the draft to its intended recipient(s).
795
796The @hid[Goto Headers Buffer] command, when invoked in a @hid[Draft] or
797@hid[Message] buffer, makes the associated @hid[Headers] buffer current. The
798@hid[Goto Message Buffer] command, when invoked in a @hid[Draft] buffer, makes
799the associated @hid[Message] buffer current.
800@enddefcom
801
802@defcom[com "Reply to Message", stuff (bound to @bf[r] in @hid[Headers] mode) ]
803@defcom1[com "Reply to Message in Other Window", stuff (bound to @bf[r] in @hid[Message] mode) ]
804@defhvar1[var "Reply to Message Prefix Action"]
805 @hid[Reply to Message], when invoked in a @hid[Headers] buffer, creates a
806unique @hid[Draft] buffer and a unique @hid[Message] buffer. The current
807message is inserted in the @hid[Message] buffer, and the @hid[Draft] buffer is
808displayed in the current window. The draft components are set up in reply to
809the message, and the @hid[Draft] buffer's point is moved to the end of the
810buffer. The name of the draft message file is used to produce the buffer's
811name. A pathname is associated with the @hid[Draft] buffer so that @hid[Save
812File] can be used to incrementally save a composition before delivering it.
813The @f[repl] utility will be used to allocate a draft message file in the
814user's @mh draft folder and to insert the proper header components into the
815draft message. Both the @hid[Draft] and @hid[Message] buffers are associated
816with the @hid[Headers] buffer, and the @hid[Draft] buffer is associated with
817the @hid[Message] buffer.
818
819When invoked in a @hid[Message] buffer, a unique @hid[Draft] buffer is set up
820using the message in the buffer as the associated message. Any previous
821association between the @hid[Message] buffer and a @hid[Draft] buffer is
822removed. Any association of the @hid[Message] buffer with a @hid[Headers]
823buffer is propagated to the @hid[Draft] buffer.
824
825When not in a @hid[Headers] buffer or @hid[Message] buffer, this command
826prompts for a folder and message to reply to. This message is inserted into a
827unique @hid[Message] buffer, and a unique @hid[Draft] buffer is created as in
828the previous two cases. There is no association of either the @hid[Message]
829buffer or the @hid[Draft] buffer with a @hid[Headers] buffer.
830
831When a prefix argument is supplied, @hid[Reply to Message Prefix Action] is
832considered with respect to supplying carbon copy switches to @f[repl]. This
833variable's value is one of @b[:cc-all], :@b[no-cc-all], or @nil. See section
834@ref[Styles] for examples of how to use this.
835
836@hid[Reply to Message in Other Window] is identical to @hid[Reply to Message],
837but the current window is split showing the @hid[Draft] buffer in the new
838window. The split window displays the @hid[Message] buffer.
839
840@hid[Deliver Message] will deliver the draft to its intended recipient(s).
841
842The @hid[Goto Headers Buffer] commmand, when invoked in a @hid[Draft] or
843@hid[Message] buffer, makes the associated @hid[Headers] buffer current. The
844@hid[Goto Message Buffer] command, when invoked in a @hid[Draft] buffer, makes
845the associated @hid[Message] buffer current.
846@enddefcom
847
848@defcom[com "Forward Message", stuff (bound to @bf[f] in @hid[Headers] and @hid[Message] modes) ]
849 This command, when invoked in a @hid[Headers] buffer, creates a unique
850@hid[Draft] buffer. The current message is inserted in the draft by using the
851@f[forw] utility, and the @hid[Draft] buffer is shown in the current window.
852The name of the draft message file is used to produce the buffer's name. A
853pathname is associated with the @hid[Draft] buffer so that @hid[Save File] can
854be used to incrementally save a composition before delivering it. The
855@hid[Draft] buffer is associated with the @hid[Headers] buffer, but no
856@hid[Message] buffer is created since the message is already a part of the
857draft.
858
859When invoked in a @hid[Message] buffer, a unique @hid[Draft] buffer is set up
860inserting the message into the @hid[Draft] buffer. The @hid[Message] buffer is
861not associated with the @hid[Draft] buffer because the message is already a
862part of the draft. However, any association of the @hid[Message] buffer with a
863@hid[Headers] buffer is propagated to the @hid[Draft] buffer.
864
865When not in a @hid[Headers] buffer or @hid[Message] buffer, this command
866prompts for a folder and message to forward. A @hid[Draft] buffer is created
867as described in the previous two cases.
868
869@hid[Deliver Message] will deliver the draft to its intended recipient(s).
870@enddefcom
871
872@defcom[com "Deliver Message", stuff (bound to @bf[H-s] and @bf[H-c] in @hid[Draft] mode) ]
873@defhvar1[var "Deliver Message Confirm", val {nil}]
874 This command, when invoked in a @hid[Draft] buffer, saves the file and uses
875the @mh @f[send] utility to deliver the draft. If the draft is a reply to some
876message, then @f[anno] is used to annotate that message with a "@f[replied]"
877component. Any @hid[Headers] buffers containing the replied-to message are
878updated with an "@b[A]" placed in the appropriate headers line two characters
879after the message ID. Before doing any of this, confirmation is asked for
880based on @hid[Deliver Message Confirm].
881
882When not in a @hid[Draft] buffer, this prompts for a draft message ID and
883invokes @f[send] on that draft message to deliver it. Sending a draft in this
884way severs any association that draft may have had with a message being replied
885to, so no annotation will occur.
886@enddefcom
887
888@defcom[com "Delete Draft and Buffer", stuff (bound to @bf[H-q] in @hid[Draft] mode) ]
889This command, when invoked in a @hid[Draft] buffer, deletes the draft message
890file and the buffer. This also deletes any associated message buffer unless
891the user preserved it with @hid[Keep Message].
892@enddefcom
893
894@defcom[com "Remail Message", stuff (bound to @bf[H-r] in @hid[Headers] and @hid[Message] modes) ]
895 This command, when invoked in a @hid[Headers] or @hid[Message] buffer, prompts
896for resend @f[To:] and resend @f[Cc:] addresses, remailing the current message.
897When invoked in any other kind of buffer, this command prompts for a folder and
898message as well. @mh@comment{}'s @f[dist] sets up a draft folder message which is then
899modified. The above mentioned addresses are inserted on the @f[Resent-To:] and
900@f[Resent-Cc:] lines. Then the message is delivered.
901
902There is no mechanism for annotating messages as having been remailed.
903@enddefcom
904
905@defcom[com "Draft Help", bind (Draft: H-?)]
906This command displays documentation on @hid[Draft] mode.
907@enddefcom
908
909
910@section[Convenience Commands for Message and Draft Buffers]
911@index[message buffer commands]
912@index[draft buffer commands]
913@index[convenience commands for mail interface]
914@label[convenience-coms]
915This section describes how to switch from a @hid[Message] or @hid[Draft] buffer
916to its associated @hid[Headers] buffer, or from a @hid[Draft] buffer to its
917associated @hid[Message] buffer. There are also commands for various styles of
918inserting text from a @hid[Message] buffer into a @hid[Draft] buffer.
919
920@defcom[com "Goto Headers Buffer", stuff (bound to @bf[^] in @hid[Message] mode and @bf[H-^] in @hid[Draft] mode) ]
921This command, when invoked in a @hid[Message] or @hid[Draft] buffer with an
922associated @hid[Headers] buffer, places the associated @hid[Headers] buffer in
923the current window.
924
925The cursor is moved to the headers line of the associated message.
926@enddefcom
927
928@defcom[com "Goto Message Buffer", stuff (bound to @bf[H-m] in @hid[Draft] mode) ]
929This command, when invoked in a @hid[Draft] buffer with an associated
930@hid[Message] buffer, places the associated @hid[Message] buffer in the current
931window.
932@enddefcom
933
934@defcom[com "Insert Message Region", stuff (bound to @bf[H-y] in appropriate modes) ]
935@defhvar1[var "Message Insertion Prefix", val {" "}]
936@defhvar1[var "Message Insertion Column", val {75}]
937This command, when invoked in a @hid[Message] or @hid[News-Message] (where it
938is bound) buffer that has an associated @hid[Draft] or @hid[Post] buffer,
939copies the current active region into the @hid[Draft] or @hid[Post] buffer. It
940is filled using @hid[Message Insertion Prefix] (which defaults to three spaces)
941and @hid[Message Insertion Column]. If an argument is supplied, the filling is
942inhibited.
943@enddefcom
944
945@defcom[com "Insert Message Buffer", stuff (bound to @bf[H-y] in appropriate modes) ]
946@defhvar1[var "Message Buffer Insertion Prefix", val {" "}]
947This command, when invoked in a @hid[Draft] or @hid[Post] (where it is bound)
948buffer with an associated @hid[Message] or @hid[News-Message] buffer, or when
949in a @hid[Message] (or @hid[News-Message]) buffer that has an associated
950@hid[Draft] buffer, inserts the @hid[Message] buffer into the @hid[Draft] (or
951@hid[Post]) buffer. Each inserted line is modified by prefixing it with
952@hid[Message Buffer Insertion Prefix] (which defaults to four spaces) . If an
953argument is supplied, the prefixing is inhibited.
954@enddefcom
955
956@defcom[com "Edit Message Buffer", stuff (bound to @bf[e] in @hid[Message] mode) ]
957This command puts the current @hid[Message] buffer in @hid[Text] mode and makes
958it writable (@hid[Message] buffers are normally read-only). The pathname of
959the file which the message is in is associated with the buffer making saving
960possible. A recursive edit is entered, and the user is allowed to make changes
961to the message. When the recursive edit is exited, if the buffer is modified,
962the user is asked if the changes should be saved. The buffer is marked
963unmodified, and the pathname is disassociated from the buffer. The buffer
964otherwise returns to its previous state as a @hid[Message] buffer. If the
965recursive edit is aborted, the user is not asked to save the file, and the
966buffer remains changed though it is marked unmodified.
967@enddefcom
968
969
970@section[Deleting Messages]
971@index[deleting messages]
972@label[deleting]
973The main command described in this section is @hid[Headers Delete Message]
974(bound to @bf[k] in @hid[Headers] and @hid[Message] modes). A useful command
975for reading new mail is @hid[Delete Message and Show Next] (bound to @bf[d] in
976@hid[Message] mode) which deletes the current message and shows the next
977undeleted message.
978
979Since messages are by default deleted using a virtual message deletion
980mechanism, @hid[Expunge Messages] (bound to @bf[!] in @hid[Headers] mode)
981should be mentioned here. This is described in section @ref[terminating].
982
983
984@defhvar[var "Virtual Message Deletion", val {t}]
985When set, @hid[Delete Message] adds a message to the "@f[hemlockdeleted]"
986sequence; otherwise, @f[rmm] is invoked on the message immediately.
987@enddefhvar
988
989@defcom[com "Delete Message" ]
990This command prompts for a folder, messages, and an optional @f[pick]
991expression. When invoked in a @hid[Headers] buffer of the specified folder,
992the prompt for a message specification will default to the those messages in
993that @hid[Headers] buffer.
994
995When the variable @hid[Virtual Message Deletion] is set, this command merely
996flags the messages for deletion by adding them to the "@f[hemlockdeleted]"
997sequence. Then this updates any @hid[Headers] buffers representing the folder.
998It notates each headers line referring to a deleted message with a "@b[D]" in
999the third character position after the message ID.
1000
1001When @hid[Virtual Message Deletion] is not set, @f[rmm] is invoked on the
1002message, and each headers line referring to the deleted message is deleted from
1003its buffer
1004@enddefcom
1005
1006@defcom[com "Headers Delete Message", stuff (bound to @bf[k] in @hid[Headers] and @hid[Message] modes) ]
1007This command, when invoked in a @hid[Headers] buffer, deletes the message on
1008the current line as described in @hid[Delete Message].
1009
1010When invoked in a @hid[Message] buffer, the message displayed in it is deleted
1011as described in @hid[Delete Message].
1012@enddefcom
1013
1014@defcom[com "Delete Message and Show Next", stuff (bound to @bf[k] in @hid[Headers] and @hid[Message] modes) ]
1015This command is only valid in a @hid[Headers] buffer or a @hid[Message] buffer
1016associated with some @hid[Headers] buffer. The current message is deleted as
1017with the @hid[Delete Message] command. Then the next message is shown as with
1018@hid[Next Undeleted Message].
1019@enddefcom
1020
1021@defcom[com "Delete Message and Down Line", stuff (bound to @bf[d] in @hid[Headers mode])]
1022This command, when invoked in a @hid[Headers] buffer, deletes the message on
1023the current line. Then the point is moved to the next non-blank line.
1024@enddefcom
1025
1026@defcom[com "Undelete Message" ]
1027This command is only meaningful when @hid[Virtual Message Deletion] is set.
1028This prompts for a folder, messages, and an optional @f[pick] expression. When
1029in a @hid[Headers] buffer of the specified folder, the messages prompt defaults
1030to those messages in the buffer. All @hid[Headers] buffers representing the
1031folder are updated. Each headers line referring to an undeleted message is
1032notated by replacing the "@b[D]" in the third character position after the
1033message ID with a space.
1034@enddefcom
1035
1036@defcom[com "Headers Undelete Message", stuff (bound to @bf[u] in @hid[Headers] and @hid[Message] modes) ]
1037This command is only meaningful when @hid[Virtual Message Deletion] is set.
1038When invoked in a @hid[Headers] buffer, the message on the current line is
1039undeleted as described in @hid[Undelete Message].
1040
1041When invoked in a @hid[Message] buffer, the message displayed in it is
1042undeleted as described in @hid[Undelete Message].
1043@enddefcom
1044
1045
1046@section[Folder Operations]
1047
1048@index[folder operations]@label[folder]
1049@defcom[com "List Folders" ]
1050This command displays a list of all current mail folders in the user's
1051top-level mail directory in a @hemlock pop-up window.
1052@enddefcom
1053
1054@defcom[com "Create Folder"]
1055This command prompts for and creates a folder. If the folder already exists,
1056an error is signaled.
1057@enddefcom
1058
1059@defcom[com "Delete Folder" ]
1060This command prompts for a folder and uses @f[rmf] to delete it. Note that no
1061confirmation is asked for.
1062@enddefcom
1063
1064
1065@section[Refiling Messages]
1066
1067@index[refiling messages]@label[refiling]
1068@defcom[com "Refile Message" ]
1069This command prompts for a folder, messages, an optional @f[pick] expression,
1070and a destination folder. When invoked in a @hid[Headers] buffer of the
1071specified folder, the message prompt offers a default of those messages in the
1072buffer. If the destination folder does not exist, the user is asked to create
1073it. The resulting messages are refiled with the @f[refile] utility. All
1074@hid[Headers] buffers for the folder are updated. Each line referring to a
1075refiled message is deleted from its buffer.
1076@enddefcom
1077
1078@defcom[com "Headers Refile Message", stuff (bound to @bf[o] in @hid[Headers] and @hid[Message] modes) ]
1079This command, when invoked in a @hid[Headers] buffer, prompts for a destination
1080folder, refiling the message on the current line with @f[refile]. If the
1081destination folder does not exist, the user is asked to create it. Any
1082@hid[Headers] buffers containing messages for that folder are updated. Each
1083headers line referring to the refiled message is deleted from its buffer.
1084
1085When invoked in a @hid[Message] buffer, that message is refiled as described
1086above.
1087@enddefcom
1088
1089
1090@section[Marking Messages]
1091@index[marking messages]
1092@label[marking]
1093@defcom[com "Mark Message" ]
1094This command prompts for a folder, message, and sequence and adds (deletes) the
1095message specification to (from) the sequence. By default this adds the
1096message, but if an argument is supplied, this deletes the message. When
1097invoked in a @hid[Headers] buffer or @hid[Message] buffer, this only prompts
1098for a sequence and uses the current message.
1099@enddefcom
1100
1101
1102@section[Terminating Headers Buffers]
1103@label[terminating]
1104The user never actually @i[exits] the mailer. He can leave mail buffers lying
1105around while conducting other editing tasks, selecting them and continuing his
1106mail handling whenever. There still is a need for various methods of
1107terminating or cleaning up @hid[Headers] buffers. The two most useful commands
1108in this section are @hid[Expunge Messages] and @hid[Quit Headers].
1109
1110
1111@defhvar[var "Expunge Messages Confirm", val {t}]
1112When this is set, @hid[Quit Headers] and @hid[Expunge Messages] will ask for
1113confirmation before expunging messages and packing the folder's message ID's.
1114@enddefhvar
1115
1116@defhvar[var "Temporary Draft Folder", val {nil}]
1117This is a folder name where @mh @f[fcc:] messages are kept with the intention
1118that this folder's messages will be deleted and expunged whenever messages from
1119any folder are expunged (for example, when @hid[Expunge Messages] or @hid[Quit
1120Headers] is invoked.
1121@enddefhvar
1122
1123@defcom[com "Expunge Messages", stuff (bound to @bf[!] in @hid[Headers] mode) ]
1124This command deletes messages @f[mark]'ed for deletion, and compacts the
1125folder's message ID's. If there are messages to expunge, ask the user for
1126confirmation, displaying the folder name. This can be inhibited by setting
1127@hid[Expunge Messages Confirm] to @nil. When @hid[Temporary Draft Folder] is
1128not @nil, this command deletes and expunges that folder's messages regardless
1129of the folder in which the user invokes it, and a negative response to the
1130request for confirmation inhibits this.
1131
1132When invoked in a @hid[Headers] buffer, the messages in that folder's
1133"@f[hemlockdeleted]" sequence are deleted by invoking @f[rmm]. Then the ID's
1134of the folder's remaining messages are compacted using the @f[folder] utility.
1135Since headers must be regenerated due to renumbering or reassigning message
1136ID's, and because @hid[Headers] buffers become inconsistent after messages are
1137deleted, @hemlock must regenerate all the headers for the folder. Multiple
1138@hid[Headers] buffers for the same folder are then collapsed into one buffer,
1139deleting unnecessary duplicates. Any @hid[Message] buffers associated with
1140these @hid[Headers] buffers are deleted.
1141
1142If there is an unseen @hid[Headers] buffer for the folder, it is handled
1143separately from the @hid[Headers] buffers described above. @hemlock tries to
1144update it by filling it only with remaining unseen message headers.
1145Additionally, any headers generated due to @hid[Unseen Headers Message Spec]
1146are inserted. If there are no headers, unseen or otherwise, the buffer is left
1147blank.
1148
1149Any @hid[Draft] buffer set up as a reply to a message in the folder is affected
1150as well since the associated message has possibly been deleted. When a draft
1151of this type is delivered, no message will be annotated as having been replied
1152to.
1153
1154When invoked in a @hid[Message] buffer, this uses its corresponding folder as
1155the folder argument. The same updating as described above occurs.
1156
1157In any other type of buffer, a folder is prompted for.
1158@enddefcom
1159
1160@defcom[com "Quit Headers", stuff (bound to @bf[q] in @hid[Headers] and @hid[Message] modes) ]
1161This command affects the current @hid[Headers] buffer. When there are deleted
1162messages, ask the user for confirmation on expunging the messages and packing
1163the folder's message ID's. This prompting can be inhibited by setting
1164@hid[Expunge Messages Confirm] to @nil. After deleting and packing, this
1165deletes the buffer and all its associated @hid[Message] buffers.
1166
1167Other @hid[Headers] buffers regarding the same folder are handled as described
1168in @hid[Expunge Messages], but the buffer this command is invoked in is always
1169deleted.
1170
1171When @hid[Temporary Draft Folder] is not @nil, this folder's messages are
1172deleted and expunged regardless of the folder in which the user invokes this
1173command. A negative response to the above mentioned request for confirmation
1174inhibits this.
1175@enddefcom
1176
1177@defcom[com "Delete Headers Buffer and Message Buffers" ]
1178This command prompts for a @hid[Headers] buffer to delete along with its
1179associated @hid[Message] buffers. Any associated @hid[Draft] buffers are left
1180intact, but their corresponding @hid[Message] buffers will be deleted. When
1181invoked in a @hid[Headers] buffer or a @hid[Message] buffer associated with a
1182@hid[Headers] buffer, that @hid[Headers] buffer is offered as a default.
1183@enddefcom
1184
1185
1186@section[Miscellaneous Commands]
1187@label[miscellaneous mail commands]
1188@label[miscellaneous]
1189
1190@defcom[com "List Mail Buffers", stuff (bound to @bf[l] in @hid[Headers] and @hid[Message] modes @bf[H-l] in @hid[Draft] mode) ]
1191This command shows a list of all mail @hid[Message], @hid[Headers], and
1192@hid[Draft] buffers.
1193
1194If a @hid[Message] buffer has an associated @hid[Headers] buffer, it is
1195displayed to the right of the @hid[Message] buffer's name.
1196
1197If a @hid[Draft] buffer has an associated @hid[Message] buffer, it is displayed
1198to the right of the @hid[Draft] buffer's name. If a @hid[Draft] buffer has no
1199associated @hid[Message] buffer, but it is associated with a @hid[Headers]
1200buffer, then the name of the @hid[Headers] buffer is displayed to the right of
1201the @hid[Draft] buffer.
1202
1203For each buffer listed, if it is modified, then an asterisk is displayed before
1204the name of the buffer.
1205@enddefcom
1206
1207
1208@section[Styles of Usage]
1209@index[styles of mail interface usage]
1210@label[Styles]
1211This section discusses some styles of usage or ways to make use of some of the
1212features of @hemlock@comment{}'s interface to @mh that might not be obvious. In each
1213case, setting some variables and/or remembering an extra side effect of a
1214command will lend greater flexibility and functionality to the user.
1215
1216@subsection[Unseen Headers Message Spec]
1217The unseen @hid[Headers] buffer by default only shows unseen headers which is
1218adequate for one folder, simple mail handling. Some people use their @hid[New
1219Mail Folder] only for incoming mail, refiling or otherwise dispatching a
1220message immediately. Under this mode it is easy to conceive of the user not
1221having time to respond to a message, but he would like to leave it in this
1222folder to remind him to take care of it. Using the @hid[Unseen Headers Message
1223Spec] variable, the user can cause all the messages the @hid[New Mail Folder] to
1224be inserted into the unseen @hid[Headers] buffer whenever just unseen headers
1225would be. This way he sees all the messages that require immediate attention.
1226
1227To achieve the above effect, @hid[Unseen Headers Message Spec] should be set to
1228the string @f["all"]. This variable can be set to any general @mh message
1229specification (see section @ref[mhcommands] of this chapter), so the user can
1230include headers of messages other than those that have not been seen without
1231having to insert all of them. For example, the user could set the variable to
1232@f["flagged"] and use the @hid[Mark Message] command to add messages he's
1233concerned about to the @f["flagged"] sequence. Then the user would see new
1234mail and interesting mail in his unseen @hid[Headers] buffer, but he doesn't
1235have to see everything in his @hid[New Mail Folder].
1236
1237
1238@subsection[Temporary Draft Folder]
1239Section @ref[components-files] of this chapter discusses how to make @mh keep
1240personal copies of outgoing mail. The method described will cause a copy of
1241every outgoing message to be saved forever and requires the user to go through
1242his @f[Fcc:] folder, weeding out those he does not need. The @hid[Temporary
1243Draft Folder] variable can name a folder whose messages will be deleted and
1244expunged whenever any folder's messages are expunged. By naming this folder in
1245the @mh profile and components files, copies of outgoing messages can be saved
1246temporarily. They will be cleaned up automatically, but the user still has a
1247time frame in which he can permanently save a copy of an outgoing message.
1248This folder can be visited with @hid[Message Headers], and messages can be
1249refiled just like any other folder.
1250
1251
1252@subsection[Reply to Message Prefix Action]
1253Depending on the kinds of messages one tends to handle, the user may find
1254himself usually replying to everyone who receives a certain message, or he may
1255find that this is only desired occasionally. In either case, the user
1256can set up his @mh profile to do one thing by default, using the @hid[Reply
1257to Message Prefix Action] variable in combination with a prefix argument to the
1258@hid[Reply to Message] command to get the other effect.
1259
1260For example, the following line in one's @mh profile will cause @mh to reply to
1261everyone receiving a certain message (except for the user himself since he
1262saves personal copies with the @f[-fcc] switch):
1263@begin[programexample]
1264repl: -cc all -nocc me -fcc out-copy
1265@end[programexample]
1266This user can set @hid[Reply to Message Prefix Action] to be @f[:no-cc-all].
1267Then whenever he invokes @hid[Reply to Message] with a prefix argument, instead
1268of replying to everyone, the draft will be set up in reply only to the person
1269who sent the mail.
1270
1271As an alternative example, not specifying anything in one's @mh profile and
1272setting this variable to @f[:cc-all] will have a default effect of replying
1273only to the sender of a piece of mail. Then invoking @hid[Reply to Message]
1274with a prefix argument will cause everyone who received the mail to get a copy
1275of the reply. If the user does not want a @f[cc:] copy, then he can add
1276@f[-nocc me] as a default switch and value in his @mh profile.
1277
1278
1279@newpage
1280@section[Wallchart]
1281
1282@tabclear
1283@tabdivide(3)
1284
1285@begin[format, spacing 1.5]
1286
1287@Begin[Center] @b[Global bindings:] @End[Center]
1288
1289@hid[Incorporate and Read New Mail]@\@\@bf[C-x i]
1290@hid[Send Message]@\@\@bf[C-x m]
1291@hid[Message Headers]@\@\@bf[C-x r]
1292
1293
1294@Begin[Center] @b[Headers and Message modes bindings:] @End[Center]
1295
1296@hid[Next Undeleted Message]@\@\@bf[n]
1297@hid[Previous Undeleted Message]@\@\@bf[p]
1298@hid[Send Message]@\@\@bf[s], @bf[m]
1299@hid[Forward Message]@\@\@bf[f]
1300@hid[Headers Delete Message]@\@\@bf[k]
1301@hid[Headers Undelete Message]@\@\@bf[u]
1302@hid[Headers Refile Message]@\@\@bf[o]
1303@hid[List Mail Buffers]@\@\@bf[l]
1304@hid[Quit Headers]@\@\@bf[q]
1305@hid[Incorporate and Read New Mail]@\@\@bf[i]
1306@hid[Next Message]@\@\@bf[M-n]
1307@hid[Previous Message]@\@\@bf[M-p]
1308@hid[Beginning of Buffer]@\@\@bf[<]
1309@hid[End of Buffer]@\@\@bf[>]
1310
1311
1312@Begin[Center] @b[Headers mode bindings:] @End[Center]
1313
1314@hid[Delete Message and Down Line]@\@\@bf[d]
1315@hid[Pick Headers]@\@\@bf[h]
1316@hid[Show Message]@\@\@bf[space], @bf[.]
1317@hid[Reply to Message]@\@\@bf[r]
1318@hid[Expunge Messages]@\@\@bf[!]
1319
1320
1321@Begin[Center] @b[Message mode bindings:] @End[Center]
1322
1323@hid[Delete Message and Show Next]@\@\@bf[d]
1324@hid[Goto Headers Buffer]@\@\@bf[^]
1325@hid[Scroll Message]@\@\@bf[space]
1326@hid[Scroll Message]@\@\@bf[C-v]
1327@hid[Scroll Window Up]@\@\@bf[backspace], @bf[delete]
1328@hid[Reply to Message in Other Window]@\@bf[r]
1329@hid[Edit Message Buffer]@\@\@bf[e]
1330@hid[Insert Message Region]@\@\@bf[H-y]
1331
1332
1333@Begin[Center] @b[Draft mode bindings:] @End[Center]
1334
1335@hid[Goto Headers Buffer]@\@\@bf[H-^]
1336@hid[Goto Message Buffer]@\@\@bf[H-m]
1337@hid[Deliver Message]@\@\@bf[H-s], @bf[H-c]
1338@hid[Insert Message Buffer]@\@\@bf[H-y]
1339@hid[Delete Draft and Buffer]@\@\@bf[H-q]
1340@hid[List Mail Buffers]@\@\@bf[H-l]
1341
1342@end[format]
1343@tabclear
Note: See TracBrowser for help on using the repository browser.