*** empty log message ***
[gnus] / texi / message.texi
1 \input texinfo                  @c -*-texinfo-*-
2
3 @setfilename message
4 @settitle Message Manual
5 @synindex fn cp
6 @synindex vr cp
7 @synindex pg cp
8 @iftex
9 @finalout
10 @end iftex
11 @setchapternewpage odd
12
13 @ifinfo
14
15 This file documents Messa, the Emacs message composition mode.
16
17 Copyright (C) 1996 Free Software Foundation, Inc.
18
19 Permission is granted to make and distribute verbatim copies of
20 this manual provided the copyright notice and this permission notice
21 are preserved on all copies.
22
23 @ignore
24 Permission is granted to process this file through Tex and print the
25 results, provided the printed document carries copying permission
26 notice identical to this one except for the removal of this paragraph
27 (this paragraph not being relevant to the printed manual).
28
29 @end ignore
30 Permission is granted to copy and distribute modified versions of this
31 manual under the conditions for verbatim copying, provided also that the
32 entire resulting derived work is distributed under the terms of a
33 permission notice identical to this one.
34
35 Permission is granted to copy and distribute translations of this manual
36 into another language, under the above conditions for modified versions.
37 @end ifinfo
38
39 @tex
40
41 @titlepage
42 @title Message Manual
43
44 @author by Lars Magne Ingebrigtsen
45 @page
46
47 @vskip 0pt plus 1filll
48 Copyright @copyright{} 1996 Free Software Foundation, Inc. 
49
50 Permission is granted to make and distribute verbatim copies of
51 this manual provided the copyright notice and this permission notice
52 are preserved on all copies.
53
54 Permission is granted to copy and distribute modified versions of this
55 manual under the conditions for verbatim copying, provided that the
56 entire resulting derived work is distributed under the terms of a
57 permission notice identical to this one.
58
59 Permission is granted to copy and distribute translations of this manual
60 into another language, under the above conditions for modified versions.
61
62 @end titlepage
63 @page
64
65 @end tex
66
67 @node Top
68 @top Message
69
70 All message composition (both mail and news) takes place in Message mode
71 buffers.
72
73 @menu
74 * Interface::         Setting up message buffers.
75 * Commands::          Commands you can execute in message mode buffers.
76 * Variables::         Customizing the message buffers.
77 * Index::             Variable, function and concept index.
78 * Key Index::         List of Message mode keys.
79 @end menu
80
81
82 @node Interface
83 @chapter Interface
84
85 When a program (or a person) wants to respond to a message -- reply,
86 follow up, forward, cancel -- the program (or person) should just put
87 point in the buffer where the message is and call the required command.
88 @code{Message} will then pop up a new @code{message} mode buffer with
89 appropriate headers filled out, and the user can edit the message before
90 sending it.
91
92 @menu
93 * New Mail Message::     Editing a brand new mail message.
94 * New News Message::     Editing a brand new news message.
95 * Reply::                Replying via mail.
96 * Wide Reply::           Responding to all people via mail.
97 * Followup::             Following up via news.
98 * Canceling News::       Canceling a news article.
99 * Superseding::          Superseding a message.
100 * Forwarding::           Forwarding a message via news or mail.
101 * Resending::            Resending a mail message.
102 * Bouncing::             Bouncing a mail message.
103 @end menu
104
105
106 @node New Mail Message
107 @section New Mail Message
108
109 @findex message-mail
110 The @code{message-mail} command pops up a new message buffer.  
111
112 Two optional parameters are accepted: The first will be used as the
113 @code{To} header and the second as the @code{Subject} header.  If these
114 aren't present, those two headers will be empty.
115
116
117 @node New News Message
118 @section New News Message
119
120 @findex message-news
121 The @code{message-news} command pops up a new message buffer.  
122
123 This function accepts two optional parameters.  The first will be used
124 as the @code{Newsgroups} header and the second as the @code{Subject}
125 header.  If these aren't present, those two headers will be empty.
126
127
128 @node Reply
129 @section Reply
130
131 @findex message-reply
132 The @code{message-reply} function pops up a message buffer that's a
133 reply to the message in the current buffer.
134
135 @vindex message-reply-to-function
136 Message uses the normal methods to determine where replies are to go,
137 but you can change the behavior to suit your needs by fiddling with the
138 @code{message-reply-to-function} variable.
139
140 If you want the replies to go to the @code{Sender} instead of the
141 @code{From}, you could do something like this:
142
143 @lisp
144 (setq message-reply-to-function
145       (lambda ()
146        (cond ((equal (mail-fetch-field "from") "somebody")
147                (mail-fetch-field "sender"))     
148              (t 
149               nil))))
150 @end lisp
151
152 This function will be called narrowed to the head of the article that is
153 being replied to.
154
155 As you can see, this function should return a string if it has an
156 opinion as to what the To header should be.  If it does not, it should
157 just return @code{nil}, and the normal methods for determining the To
158 header will be used.
159
160 This function can also return a list.  In that case, each list element
161 should be a cons, where the car should be the name of an header
162 (eg. @code{Cc}) and the cdr should be the header value
163 (eg. @samp{larsi@@ifi.uio.no}).  All these headers will be inserted into
164 the head of the outgoing mail. 
165
166
167 @node Wide Reply
168 @section Wide Reply
169
170 @findex message-wide-reply
171 The @code{message-wide-reply} pops up a message buffer that's a wide
172 reply to the message in the current buffer.  A @dfn{wide reply} is a
173 reply that goes out to all people listed in the @code{To}, @code{From}
174 and @code{Cc} headers.
175
176 @vindex message-wide-reply-to-function
177 Message uses the normal methods to determine where wide replies are to go,
178 but you can change the behavior to suit your needs by fiddling with the
179 @code{message-wide-reply-to-function}.  It is used in the same way as
180 @code{message-reply-to-function} (@pxref{Reply}). 
181
182 @findex rmail-dont-reply-to-names
183 Addresses that match the @code{rmail-dont-reply-to-names} regular
184 expression will be removed from the @code{Cc} header.
185
186
187 @node Followup
188 @section Followup
189
190 @findex message-followup
191 The @code{message-followup} command pops up a message buffer that's a
192 followup to the message in the current buffer.
193
194 @vindex message-followup-to-function
195 Message uses the normal methods to determine where followups are to go,
196 but you can change the behavior to suit your needs by fiddling with the
197 @code{message-followup-to-function}.  It is used in the same way as
198 @code{message-reply-to-function} (@pxref{Reply}).
199
200 @vindex message-use-followup-to
201 The @code{message-use-followup-to} variable says what to do about
202 @code{Followup-To} headers.  If it is @code{use}, always use the value.
203 If it is @code{ask} (which is the default), ask whether to use the
204 value.  If it is @code{t}, use the value unless it is @samp{poster}.  If
205 it is @code{nil}, don't use the value.
206
207
208 @node Canceling News
209 @section Canceling News
210
211 @findex message-cancel-news
212 The @code{message-cancel-news} command cancels the article in the
213 current buffer.
214
215
216 @node Superseding
217 @section Superseding
218
219 @findex message-supersede
220 The @code{message-supersede} command pops up a message buffer that will
221 supersede the message in the current buffer.
222
223 @vindex message-ignored-supersedes-headers
224 Headers matching the @code{message-ignored-supersedes-headers} are
225 removed before popping up the new message buffer.  The default is@*
226 @samp{^Path:\\|^Date\\|^NNTP-Posting-Host:\\|^Xref:\\|^Lines:\\|@*
227 ^Received:\\|^X-From-Line:\\|Return-Path:}.
228
229
230
231 @node Forwarding
232 @section Forwarding
233
234 @findex message-forward
235 The @code{message-forward} command pops up a message buffer to forward
236 the message in the current buffer.  If given a prefix, forward using
237 news.
238
239 @table @code
240 @item message-forward-start-separator
241 @vindex message-forward-start-separator
242 Delimiter inserted before forwarded messages.  The default is@*
243 @samp{------- Start of forwarded message -------\n}. 
244
245 @vindex message-forward-end-separator
246 @item message-forward-end-separator
247 @vindex message-forward-end-separator
248 Delimiter inserted after forwarded messages.  The default is@*
249 @samp{------- End of forwarded message -------\n}. 
250
251 @item message-signature-before-forwarded-message
252 @vindex message-signature-before-forwarded-message
253 If this variable is @code{t}, which it is by default, your personal
254 signature will be inserted before the forwarded message.  If not, the
255 forwarded message will be inserted first in the new mail.
256
257 @item message-included-forward-headers
258 @vindex message-included-forward-headers
259 Regexp matching header lines to be included in forwarded messages.  
260
261 @end table
262
263
264 @node Resending
265 @section Resending
266
267 @findex message-resend
268 The @code{message-resend} command will prompt the user for an address
269 and resend the message in the current buffer to that address.
270
271 @vindex message-ignored-resent-headers
272 Headers that match the @code{message-ignored-resent-headers} regexp will
273 be removed before sending the message.  The default is
274 @samp{^Return-receipt}. 
275
276
277 @node Bouncing
278 @section Bouncing
279
280 @findex message-bounce
281 The @code{message-bounce} command will, if the current buffer contains a
282 bounced mail message, pop up a message buffer stripped of the bounce
283 information.  A @dfn{bounced message} is typically a mail you've sent
284 out that has been returned by some @code{mailer-daemon} as
285 undeliverable. 
286
287 @vindex message-ignored-bounced-headers
288 Headers that match the @code{message-ignored-bounced-headers} regexp
289 will be removed before popping up the buffer.  The default is
290 @samp{^Received:}. 
291
292
293 @node Commands
294 @chapter Commands
295
296 @menu
297 * Header Commands::     Commands for moving to headers.
298 * Movement::            Moving around in message buffers.
299 * Insertion::           Inserting things into message buffers.
300 * Various Commands::    Various things.
301 * Sending::             Actually sending the message.
302 @end menu
303
304
305 @node Header Commands
306 @section Header Commands
307
308 All these commands move to the header in question.  If it doesn't exist,
309 it will be inserted.
310
311 @table @kbd
312
313 @item C-c ?
314 @kindex C-c ?
315 @findex message-goto-to
316 Describe the message mode.
317
318 @item C-c C-f C-t
319 @kindex C-c C-f C-t 
320 @findex message-goto-to
321 Go to the @code{To} header (@code{message-goto-to}).
322
323 @item C-c C-f C-b
324 @kindex C-c C-f C-b 
325 @findex message-goto-bcc
326 Go to the @code{Bcc} header (@code{message-goto-bcc}).
327
328 @item C-c C-f C-f
329 @kindex C-c C-f C-f 
330 @findex message-goto-fcc
331 Go to the @code{Fcc} header (@code{message-goto-fcc}).
332
333 @item C-c C-f C-c
334 @kindex C-c C-f C-c 
335 @findex message-goto-cc
336 Go to the @code{Cc} header (@code{message-goto-cc}).
337
338 @item C-c C-f C-s
339 @kindex C-c C-f C-s 
340 @findex message-goto-subject
341 Go to the @code{Subject} header (@code{message-goto-subject}).
342
343 @item C-c C-f C-r
344 @kindex C-c C-f C-r 
345 @findex message-goto-reply-to
346 Go to the @code{Reply-To} header (@code{message-goto-reply-to}).
347
348 @item C-c C-f C-n
349 @kindex C-c C-f C-n 
350 @findex message-goto-newsgroups
351 Go to the @code{Newsgroups} header (@code{message-goto-newsgroups}).
352
353 @item C-c C-f C-d
354 @kindex C-c C-f C-d 
355 @findex message-goto-distribution
356 Go to the @code{Distribution} header (@code{message-goto-distribution}).
357
358 @item C-c C-f C-o
359 @kindex C-c C-f C-o 
360 @findex message-goto-followup-to
361 Go to the @code{Followup-To} header (@code{message-goto-followup-to}).
362
363 @item C-c C-f C-k
364 @kindex C-c C-f C-k 
365 @findex message-goto-keywords
366 Go to the @code{Keywords} header (@code{message-goto-keywords}).
367
368 @item C-c C-f C-u
369 @kindex C-c C-f C-u 
370 @findex message-goto-summary
371 Go to the @code{Summary} header (@code{message-goto-summary}).
372
373 @end table
374
375
376 @node Movement
377 @section Movement
378
379 @table @kbd
380 @item C-c C-b
381 @kindex C-c C-b 
382 @findex message-goto-body
383 Move to the beginning of the body of the message
384 (@code{message-goto-body}). 
385
386 @item C-c C-i
387 @kindex C-c C-i 
388 @findex message-goto-signature
389 Move to the signature of the message (@code{message-goto-signature}).
390
391 @end table
392
393
394 @node Insertion
395 @section Insertion
396
397 @table @kbd
398
399 @item C-c C-y
400 @kindex C-c C-y 
401 @findex message-yank-original
402 Yank the message that's being replied to into the message buffer
403 (@code{message-yank-original}). 
404
405 @item C-c C-q
406 @kindex C-c C-q 
407 @findex message-fill-yanked-message
408 Fill the yanked message (@code{message-fill-yanked-message}). 
409
410 @item C-c C-w
411 @kindex C-c C-w 
412 @findex message-insert-signature
413 Insert a signature at the end of the buffer
414 (@code{message-insert-signature}).  
415
416 @end table
417
418 @table @code
419 @item message-ignored-cited-headers
420 @vindex message-ignored-cited-headers
421 All headers that match this regexp will be removed from yanked
422 messages.  The default is @samp{.}, which means that all headers will be
423 removed.
424
425 @item message-citation-line-function
426 @vindex message-citation-line-function
427 Function called to insert the citation line.  The default is
428 @code{message-insert-citation-line}. 
429
430 @item message-yank-prefix
431 @vindex message-yank-prefix
432 @cindex yanking
433 @cindex quoting
434 When you are replying to or following up an article, you normally want
435 to quote the person you are answering.  Inserting quoted text is done by
436 @dfn{yanking}, and each quoted line you yank will have
437 @code{message-yank-prefix} prepended to it.  The default is @samp{> }.
438 If it is @code{nil}, just indent the message.
439
440 @item message-indentation-spaces
441 @vindex message-indentation-spaces
442 Number of spaces to indent yanked messages.
443
444 @item message-cite-function
445 @vindex message-cite-function
446 @findex message-cite-original
447 @findex sc-cite-original
448 @cindex Supercite
449 Function for citing an original message.  The default is
450 @code{message-cite-original}.  You can also set it to
451 @code{sc-cite-original} to use Supercite.
452
453 @item message-indent-citation-function
454 @vindex message-indent-citation-function
455 Function for modifying a citation just inserted in the mail buffer.
456 This can also be a list of functions.  Each function can find the
457 citation between @code{(point)} and @code{(mark t)}.  And each function
458 should leave point and mark around the citation text as modified.
459
460 @item message-signature
461 @vindex message-signature
462 String to be inserted at the end of the message buffer.  If @code{t}
463 (which is the default), the @code{message-signature-file} file will be
464 inserted instead.  If a function, the result from the function will be
465 used instead.  If a form, the result from the form will be used instead.
466 If this variable is @code{nil}, no signature will be inserted at all.
467
468 @item message-signature-file
469 @vindex message-signature-file
470 File containing the signature to be inserted at the end of the buffer.
471 The default is @samp{~/.signature}.
472
473 @end table
474
475 Note that RFC1036 says that a signature should be preceded by the three
476 characters @samp{-- } on a line by themselves.  This is to make it
477 easier for the recipient to automatically recognize and process the
478 signature.  So don't remove those characters, even though you might feel
479 that they ruin your beautiful design, like, totally.
480
481 Also note that no signature should be more than four lines long.
482 Including ASCII graphics is an efficient way to get everybody to believe
483 that you are silly and have nothing important to say.
484
485
486
487 @node Various Commands
488 @section Various Commands
489
490 @table @kbd
491
492 @item C-c C-r
493 @kindex C-c C-r 
494 @findex message-caesar-buffer-body
495 Caesar rotate (aka. rot13) the current message
496 (@code{message-caesar-buffer-body}).  If narrowing is in effect, just
497 rotate the visible portion of the buffer.  A numerical prefix says how
498 many places to rotate the text.  The default is 13.
499
500 @item C-c C-e
501 @kindex C-c C-e
502 @findex message-elide-region
503 Elide the text between point and mark (@code{message-elide-region}).
504 The text is killed and an ellipsis (@samp{[...]}) will be inserted in
505 its place.
506
507 @item C-c C-t
508 @kindex C-c C-t 
509 @findex message-insert-to
510 Insert a @code{To} header that contains the @code{Reply-To} or
511 @code{From} header of the message you're following up
512 (@code{message-insert-to}). 
513
514 @item C-c C-n
515 @kindex C-c C-n 
516 @findex message-insert-newsgroups
517 Insert a @code{Newsgroups} header that reflects the @code{Followup-To}
518 or @code{Newsgroups} header of the article you're replying to
519 (@code{message-insert-newsgroups}).
520
521 @item C-c M-r
522 @kindex C-c M-r
523 @findex message-rename-buffer
524 Rename the buffer (@code{message-rename-buffer}).  If given a prefix,
525 prompt for a new buffer name.
526
527 @end table
528
529
530 @node Sending
531 @section Sending
532
533 @table @kbd
534 @item C-c C-c
535 @kindex C-c C-c 
536 @findex message-send-and-exit
537 Send the message and bury the current buffer
538 (@code{message-send-and-exit}). 
539
540 @item C-c C-s
541 @kindex C-c C-s 
542 @findex message-send
543 Send the message (@code{message-send}). 
544
545 @item C-c C-d
546 @kindex C-c C-d
547 @findex message-dont-send
548 Bury the message buffer and exit (@code{message-dont-send}).
549
550 @item C-c C-k
551 @kindex C-c C-k
552 @findex message-kill-buffer
553 Kill the message buffer and exit (@code{message-kill-buffer}).
554
555 @end table
556
557
558 @node Variables
559 @chapter Variables
560
561 @menu
562 * Message Headers::             General message header stuff.
563 * Mail Headers::                Customizing mail headers.
564 * Mail Variables::              Other mail variables.
565 * News Headers::                Customizing news headers.
566 * News Variables::              Other news variables.
567 * Various Message Variables::   Other message variables.
568 * Sending Variables::           Variables for sending.
569 * Message Buffers::             How Message names its buffers.
570 * Message Actions::             Actions to be performed when exiting.
571 @end menu
572
573
574 @node Message Headers
575 @section Message Headers
576
577 Message is quite aggressive on the message generation front.  It has
578 to be -- it's a combined news and mail agent.  To be able to send
579 combined messages, it has to generate all headers itself to ensure that
580 mail and news copies of messages look sufficiently similar.
581
582 @table @code
583
584 @item message-generate-headers-first
585 @vindex message-generate-headers-first
586 If non-@code{nil}, generate all headers before starting to compose the
587 message.  
588
589 @item message-from-style
590 @vindex message-from-style
591 Specifies how @code{From} headers should look.  There are four legal
592 values:
593
594 @table @code
595 @item nil
596 Just the address -- @samp{king@@grassland.com}.
597
598 @item parens
599 @samp{king@@grassland.com (Elvis Parsley)}.
600
601 @item angles
602 @samp{Elvis Parsley <king@@grassland.com>}.
603
604 @item default
605 Look like @code{angles} if that doesn't require quoting, and
606 @code{parens} if it does.  If even @code{parens} requires quoting, use
607 @code{angles} anyway.
608
609 @end table
610
611 @item message-deletable-headers
612 @vindex message-deletable-headers
613 Headers in this list that were previously generated by Message will be
614 deleted before posting.  Let's say you post an article.  Then you decide
615 to post it again to some other group, you naughty boy, so you jump back
616 to the @code{*post-buf*} buffer, edit the @code{Newsgroups} line, and
617 ship it off again.  By default, this variable makes sure that the old
618 generated @code{Message-ID} is deleted, and a new one generated.  If
619 this isn't done, the entire empire would probably crumble, anarchy would
620 prevail, and cats would start walking on two legs and rule the world.
621 Allegedly.  
622
623 @item message-default-headers
624 @vindex message-default-headers
625 This string is inserted at the end of the headers in all message
626 buffers.
627
628 @end table
629
630
631 @node Mail Headers
632 @section Mail Headers
633
634 @table @code
635 @item message-required-mail-headers
636 @vindex message-required-mail-headers
637 @xref{News Headers}, for the syntax of this variable.  It is
638 @code{(From Date Subject (optional . In-Reply-To) Message-ID Lines
639 (optional . X-Mailer))} by default.
640
641 @item message-ignored-mail-headers
642 @vindex message-ignored-mail-headers
643 Regexp of headers to be removed before mailing.  The default is
644 @samp{^Gcc:\\|^Fcc:}. 
645
646 @item message-default-mail-headers
647 @vindex message-default-mail-headers
648 This string is inserted at the end of the headers in all message
649 buffers that are initialized as mail.
650
651 @end table
652
653
654 @node Mail Variables
655 @section Mail Variables 
656
657 @table @code
658 @item message-send-mail-function
659 @vindex message-send-mail-function
660 Function used to send the current buffer as mail.  The default is
661 @code{message-send-mail-with-sendmail}.   If you prefer using MH
662 instead, set this variable to @code{message-send-mail-with-mh}.
663
664 @end table
665
666
667 @node News Headers
668 @section News Headers
669
670 @vindex message-required-news-headers
671 @code{message-required-news-headers} a list of header symbols.  These
672 headers will either be automatically generated, or, if that's
673 impossible, they will be prompted for.  The following symbols are legal:
674
675 @table @code
676
677 @item From
678 @cindex From
679 @findex user-full-name
680 @findex user-mail-address
681 This required header will be filled out with the result of the
682 @code{message-make-from} function, which depends on the
683 @code{message-from-style}, @code{user-full-name},
684 @code{user-mail-address} variables.
685
686 @item Subject
687 @cindex Subject
688 This required header will be prompted for if not present already. 
689
690 @item Newsgroups
691 @cindex Newsgroups
692 This required header says which newsgroups the article is to be posted
693 to.  If it isn't present already, it will be prompted for.
694
695 @item Organization
696 @cindex organization
697 This optional header will be filled out depending on the
698 @code{message-user-organization} variable.
699 @code{message-user-organization-file} will be used if that variable is
700 @code{t}.
701
702 @item Lines
703 @cindex Lines
704 This optional header will be computed by Message.
705
706 @item Message-ID
707 @cindex Message-ID
708 @vindex mail-host-address
709 @findex system-name
710 @cindex Sun
711 This required header will be generated by Message.  A unique ID will be
712 created based on the date, time, user name and system name.  Message will
713 use @code{mail-host-address} as the fully qualified domain name (FQDN)
714 of the machine if that variable is defined.  If not, it will use
715 @code{system-name}, which doesn't report a FQDN on some machines --
716 notably Suns.
717
718 @item X-Newsreader
719 @cindex X-Newsreader
720 This optional header will be filled out according to the
721 @code{message-newsreader} local variable.
722
723 @item X-Mailer
724 This optional header will be filled out according to the
725 @code{message-mailer} local variable, unless there already is an
726 @code{X-Newsreader} header present.
727
728 @item In-Reply-To
729 This optional header is filled out using the @code{Date} and @code{From}
730 header of the article being replied to.
731
732 @item Expires
733 @cindex Expires
734 This extremely optional header will be inserted according to the
735 @code{message-expires} variable.  It is highly deprecated and shouldn't
736 be used unless you know what you're doing.
737
738 @item Distribution
739 @cindex Distribution
740 This optional header is filled out according to the
741 @code{message-distribution-function} variable.  It is a deprecated and
742 much misunderstood header.
743
744 @item Path
745 @cindex path
746 This extremely optional header should probably never be used.
747 However, some @emph{very} old servers require that this header is
748 present.  @code{message-user-path} further controls how this
749 @code{Path} header is to look.  If it is @code{nil}, use the server name
750 as the leaf node.  If it is a string, use the string.  If it is neither
751 a string nor @code{nil}, use the user name only.  However, it is highly
752 unlikely that you should need to fiddle with this variable at all.
753 @end table
754
755 @findex yow
756 @cindex Mime-Version
757 In addition, you can enter conses into this list.  The car of this cons
758 should be a symbol.  This symbol's name is the name of the header, and
759 the cdr can either be a string to be entered verbatim as the value of
760 this header, or it can be a function to be called.  This function should
761 return a string to be inserted.  For instance, if you want to insert
762 @code{Mime-Version: 1.0}, you should enter @code{(Mime-Version . "1.0")}
763 into the list.  If you want to insert a funny quote, you could enter
764 something like @code{(X-Yow . yow)} into the list.  The function
765 @code{yow} will then be called without any arguments.
766
767 If the list contains a cons where the car of the cons is
768 @code{optional}, the cdr of this cons will only be inserted if it is
769 non-@code{nil}.
770
771 Other variables for customizing outgoing news articles:
772
773 @table @code
774
775 @item message-syntax-checks
776 @vindex message-syntax-checks
777 If non-@code{nil}, Message will attempt to check the legality of the
778 headers, as well as some other stuff, before posting.  You can control
779 the granularity of the check by adding or removing elements from this
780 list.  Legal elements are:
781
782 @table @code
783 @item subject-cmsg 
784 Check the subject for commands.
785 @item sender
786 @cindex Sender
787 Insert a new @code{Sender} header if the @code{From} header looks odd. 
788 @item multiple-headers 
789 Check for the existence of multiple equal headers.
790 @item sendsys 
791 @cindex sendsys
792 Check for the existence of version and sendsys commands.
793 @item message-id
794 Check whether the @code{Message-ID} looks ok.
795 @item from
796 Check whether the @code{From} header seems nice.
797 @item long-lines 
798 @cindex long lines
799 Check for too long lines.
800 @item control-chars
801 Check for illegal characters.
802 @item size
803 Check for excessive size.
804 @item new-text
805 Check whether there is any new text in the messages.
806 @item signature
807 Check the length of the signature.
808 @item approved
809 @cindex approved
810 Check whether the article has an @code{Approved} header, which is
811 something only moderators should include.
812 @item empty
813 Check whether the article is empty.
814 @item empty-headers
815 Check whether any of the headers are empty.
816 @item existing-newsgroups
817 Check whether the newsgroups mentioned in the @code{Newsgroups} and 
818 @code{Followup-To} headers exist.
819 @item valid-newsgroups
820 Check whether the @code{Newsgroups} and @code{Followup-to} headers
821 are valid syntactically.
822 @item shorten-followup-to
823 Check whether to add a @code{Followup-to} header to shorten the number
824 of groups to post to.
825 @end table
826
827 All these conditions are checked by default.
828
829 @item message-ignored-news-headers
830 @vindex message-ignored-news-headers
831 Regexp of headers to be removed before posting.  The default is@*
832 @samp{^NNTP-Posting-Host:\\|^Xref:\\|^Bcc:\\|^Gcc:\\|^Fcc:}.
833
834 @item message-default-news-headers
835 @vindex message-default-news-headers
836 This string is inserted at the end of the headers in all message
837 buffers that are initialized as news.
838
839 @end table
840
841
842 @node News Variables
843 @section News Variables
844
845 @table @code
846 @item message-send-news-function
847 @vindex message-send-news-function
848 Function used to send the current buffer as news.  The default is
849 @code{message-send-news}. 
850
851 @item message-post-method
852 @vindex message-post-method
853 Method used for posting a prepared news message.
854
855 @end table
856
857
858 @node Various Message Variables
859 @section Various Message Variables
860
861 @table @code
862 @item message-signature-separator
863 @vindex message-signature-separator
864 Regexp matching the signature separator.  It is @samp{^-- *$} by
865 default. 
866
867 @item mail-header-separator
868 @vindex mail-header-separator
869 String used to separate the headers from the body.  It is @samp{--text
870 follows this line--} by default.
871
872 @item message-directory
873 @vindex message-directory
874 Directory used by many mailey things.  The default is @file{~/Mail/}. 
875
876 @item message-autosave-directory
877 @vindex message-autosave-directory
878 Directory where message buffers will be autosaved to.
879
880 @item message-signature-setup-hook
881 @vindex message-signature-setup-hook
882 Hook run when initializing the message buffer.  It is run after the
883 headers have been inserted but before the signature has been inserted. 
884
885 @item message-setup-hook
886 @vindex message-setup-hook
887 Hook run as the last thing when the message buffer has been initialized.
888
889 @item message-header-setup-hook
890 @vindex message-header-setup-hook
891 Hook called narrowed to the headers after initializing the headers. 
892
893 @item message-send-hook
894 @vindex message-send-hook
895 Hook run before sending messages.
896
897 @item message-send-mail-hook
898 @vindex message-send-mail-hook
899 Hook run before sending mail messages.
900
901 @item message-send-news-hook
902 @vindex message-send-news-hook
903 Hook run before sending news messages.
904
905 @item message-sent-hook
906 @vindex message-sent-hook
907 Hook run after sending messages.
908
909 @item message-mode-syntax-table
910 @vindex message-mode-syntax-table
911 Syntax table used in message mode buffers.
912
913 @end table
914
915
916
917 @node Sending Variables
918 @section Sending Variables
919
920 @table @code
921
922 @item message-fcc-handler-function 
923 @vindex message-fcc-handler-function 
924 A function called to save outgoing articles.  This function will be
925 called with the name of the file to store the article in. The default
926 function is @code{rmail-output} which saves in Unix mailbox format.
927
928 @item message-courtesy-message
929 @vindex message-courtesy-message
930 When sending combined messages, this string is inserted at the start of
931 the mailed copy.  If the string contains the format spec @samp{%s}, the
932 newsgroups the article has been posted to will be inserted there.  If
933 this variable is @code{nil}, no such courtesy message will be added.
934 The default value is @samp{"The following message is a courtesy copy of
935 an article\nthat has been posted to %s as well.\n\n"}. 
936
937 @end table
938
939
940 @node Message Buffers
941 @section Message Buffers
942
943 Message will generate new buffers with unique buffer names when you
944 request a message buffer.  When you send the message, the buffer isn't
945 normally killed off.  Its name is changed and a certain number of old
946 message buffers are kept alive.
947
948 @table @code
949 @item message-generate-new-buffers
950 @vindex message-generate-new-buffers
951 If non-@code{nil}, generate new buffers.  The default is @code{t}.  If
952 this is a function, call that function with three parameters: The type,
953 the to address and the group name.  (Any of these may be @code{nil}.)
954 The function should return the new buffer name.
955
956 @item message-max-buffers
957 @vindex message-max-buffers
958 This variable says how many old message buffers to keep.  If there are
959 more message buffers than this, the oldest buffer will be killed.  The
960 default is 10.  If this variable is @code{nil}, no old message buffers
961 will ever be killed.
962
963 @item message-send-rename-function
964 @vindex message-send-rename-function
965 After sending a message, the buffer is renamed from, for instance,
966 @samp{*reply to Lars*} to @samp{*sent reply to Lars*}.  If you don't
967 like this, set this variable to a function that renames the buffer in a
968 manner you like.  If you don't want to rename the buffer at all, you can
969 say:
970
971 @lisp
972 (setq message-send-rename-function 'ignore)
973 @end lisp
974
975 @item message-kill-buffer-on-exit
976 @findex message-kill-buffer-on-exit
977 If non-@code{nil}, kill the buffer immediately on exit.
978
979 @end table
980
981
982 @node Message Actions
983 @section Message Actions
984
985 When Message is being used from a news/mail reader, the reader is likely
986 to want to perform some task after the message has been sent.  Perhaps
987 return to the previous window configuration or mark an article as
988 replied.  
989
990 @vindex message-kill-actions
991 @vindex message-postpone-actions
992 @vindex message-exit-actions
993 @vindex message-send-actions
994 The user may exit from the message buffer in various ways.  The most
995 common is @kbd{C-c C-c}, which sends the message and exits.  Other
996 possibilities are @kbd{C-c C-s} which just sends the message, @kbd{C-c
997 C-d} which postpones the message editing and buries the message buffer,
998 and @kbd{C-c C-k} which kills the message buffer.  Each of these actions
999 have lists associated with them that contains actions to be executed:
1000 @code{message-send-actions}, @code{message-exit-actions},
1001 @code{message-postpone-actions}, and @code{message-kill-actions}.  
1002
1003 Message provides a function to interface with these lists:
1004 @code{message-add-action}.  The first parameter is the action to be
1005 added, and the rest of the arguments are which lists to add this action
1006 to.  Here's an example from Gnus:
1007
1008 @lisp
1009   (message-add-action
1010    `(set-window-configuration ,(current-window-configuration))
1011    'exit 'postpone 'kill)
1012 @end lisp
1013
1014 This restores the Gnus window configuration when the message buffer is
1015 killed, postponed or exited.
1016
1017 An @dfn{action} can be either: a normal function, or a list where the
1018 @code{car} is a function and the @code{cdr} is the list of arguments, or
1019 a form to be @code{eval}ed.
1020
1021 @node Index
1022 @chapter Index
1023 @printindex cp
1024
1025 @node Key Index
1026 @chapter Key Index
1027 @printindex ky
1028
1029 @summarycontents
1030 @contents
1031 @bye
1032
1033 @c End: