*** 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 matches 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:\\|^Received:\\|^X-From-Line:\\|Return-Path:}.
227
228
229
230 @node Forwarding
231 @section Forwarding
232
233 @findex message-forward
234 The @code{message-forward} command pops up a message buffer to forward
235 the message in the current buffer.  If given a prefix, forward using
236 news.
237
238 @table @code
239 @item message-forward-start-separator
240 @vindex message-forward-start-separator
241 Delimiter inserted before forwarded messages.  The default is
242 @samp{------- Start of forwarded message -------\n}. 
243
244 @vindex message-forward-end-separator
245 @item message-forward-end-separator
246 @vindex message-forward-end-separator
247 Delimiter inserted after forwarded messages.  The default is
248 @samp{------- End of forwarded message -------\n}. 
249
250 @item message-signature-before-forwarded-message
251 @vindex message-signature-before-forwarded-message
252 If this variable is @code{t}, which it is by default, your personal
253 signature will be inserted before the forwarded message.  If not, the
254 forwarded message will be inserted first in the new mail.
255
256 @item message-included-forward-headers
257 @vindex message-included-forward-headers
258 Regexp matching header lines to be included in forwarded messages.  
259
260 @end table
261
262
263 @node Resending
264 @section Resending
265
266 @findex message-resend
267 The @code{message-resend} command will prompt the user for an address
268 and resend the message in the current buffer to that address.
269
270 @vindex message-ignored-resent-headers
271 Headers the match the @code{message-ignored-resent-headers} regexp will
272 be removed before sending the message.  The default is
273 @samp{^Return-receipt}. 
274
275
276 @node Bouncing
277 @section Bouncing
278
279 @findex message-bounce
280 The @code{message-bounce} command will, if the current buffer contains a
281 bounced mail message, pop up a message buffer stripped of the bounce
282 information.  A @dfn{bounced message} is typically a mail you've sent
283 out that has been returned by some @code{mailer-daemon} as
284 undeliverable. 
285
286 @vindex message-ignored-bounced-headers
287 Headers that match the @code{message-ignored-bounced-headers} regexp
288 will be removed before popping up the buffer.  The default is
289 @samp{^Received:}. 
290
291
292 @node Commands
293 @chapter Commands
294
295 @menu
296 * Header Commands::     Commands for moving to headers.
297 * Movement::            Moving around in message buffers.
298 * Insertion::           Inserting things into message buffers.
299 * Various Commands::    Various things.
300 * Sending::             Actually sending the message.
301 @end menu
302
303
304 @node Header Commands
305 @section Header Commands
306
307 All these commands move to the header in question.  If it doesn't exist,
308 it will be inserted.
309
310 @table @kbd
311
312 @item C-c ?
313 @kindex C-c ?
314 @findex message-goto-to
315 Describe the message mode.
316
317 @item C-c C-f C-t
318 @kindex C-c C-f C-t 
319 @findex message-goto-to
320 Go to the @code{To} header (@code{message-goto-to}).
321
322 @item C-c C-f C-b
323 @kindex C-c C-f C-b 
324 @findex message-goto-bcc
325 Go to the @code{Bcc} header (@code{message-goto-bcc}).
326
327 @item C-c C-f C-f
328 @kindex C-c C-f C-f 
329 @findex message-goto-fcc
330 Go to the @code{Fcc} header (@code{message-goto-fcc}).
331
332 @item C-c C-f C-c
333 @kindex C-c C-f C-c 
334 @findex message-goto-cc
335 Go to the @code{Cc} header (@code{message-goto-cc}).
336
337 @item C-c C-f C-s
338 @kindex C-c C-f C-s 
339 @findex message-goto-subject
340 Go to the @code{Subject} header (@code{message-goto-subject}).
341
342 @item C-c C-f C-r
343 @kindex C-c C-f C-r 
344 @findex message-goto-reply-to
345 Go to the @code{Reply-To} header (@code{message-goto-reply-to}).
346
347 @item C-c C-f C-n
348 @kindex C-c C-f C-n 
349 @findex message-goto-newsgroups
350 Go to the @code{Newsgroups} header (@code{message-goto-newsgroups}).
351
352 @item C-c C-f C-d
353 @kindex C-c C-f C-d 
354 @findex message-goto-distribution
355 Go to the @code{Distribution} header (@code{message-goto-distribution}).
356
357 @item C-c C-f C-o
358 @kindex C-c C-f C-o 
359 @findex message-goto-followup-to
360 Go to the @code{Followup-To} header (@code{message-goto-followup-to}).
361
362 @item C-c C-f C-k
363 @kindex C-c C-f C-k 
364 @findex message-goto-keywords
365 Go to the @code{Keywords} header (@code{message-goto-keywords}).
366
367 @item C-c C-f C-u
368 @kindex C-c C-f C-u 
369 @findex message-goto-summary
370 Go to the @code{Summary} header (@code{message-goto-summary}).
371
372 @end table
373
374
375 @node Movement
376 @section Movement
377
378 @table @kbd
379 @item C-c C-b
380 @kindex C-c C-b 
381 @findex message-goto-body
382 Move to the beginning of the body of the message
383 (@code{message-goto-body}). 
384
385 @item C-c C-i
386 @kindex C-c C-i 
387 @findex message-goto-signature
388 Move to the signature of the message (@code{message-goto-signature}).
389
390 @end table
391
392
393 @node Insertion
394 @section Insertion
395
396 @table @kbd
397
398 @item C-c C-y
399 @kindex C-c C-y 
400 @findex message-yank-original
401 Yank the message that's being replied to into the message buffer
402 (@code{message-yank-original}). 
403
404 @item C-c C-q
405 @kindex C-c C-q 
406 @findex message-fill-yanked-message
407 Fill the yanked message (@code{message-fill-yanked-message}). 
408
409 @item C-c C-w
410 @kindex C-c C-w 
411 @findex message-insert-signature
412 Insert a signature at the end of the buffer
413 (@code{message-insert-signature}).  
414
415 @end table
416
417 @table @code
418 @item message-ignored-cited-headers
419 @vindex message-ignored-cited-headers
420 All headers that match this regexp will be removed from yanked
421 messages.  The default is @samp{.}, which means that all headers will be
422 removed.
423
424 @item message-citation-line-function
425 @vindex message-citation-line-function
426 Function called to insert the citation line.  The default is
427 @code{message-insert-citation-line}. 
428
429 @item message-yank-prefix
430 @vindex message-yank-prefix
431 @cindex yanking
432 @cindex quoting
433 When you are replying to or following up an article, you normally want
434 to quote the person you are answering.  Inserting quoted text is done by
435 @dfn{yanking}, and each quoted line you yank will have
436 @code{message-yank-prefix} prepended to it.  The default is @samp{> }.
437 If it is @code{nil}, just indent the message.
438
439 @item message-indentation-spaces
440 @vindex message-indentation-spaces
441 Number of spaces to indent yanked messages.
442
443 @item message-cite-function
444 @vindex message-cite-function
445 @findex message-cite-original
446 @findex sc-cite-original
447 @cindex Supercite
448 Function for citing an original message.  The default is
449 @code{message-cite-original}.  You can also set it to
450 @code{sc-cite-original} to use Supercite.
451
452 @item message-indent-citation-function
453 @vindex message-indent-citation-function
454 Function for modifying a citation just inserted in the mail buffer.
455 This can also be a list of functions.  Each function can find the
456 citation between @code{(point)} and @code{(mark t)}.  And each function
457 should leave point and mark around the citation text as modified.
458
459 @item message-signature
460 @vindex message-signature
461 String to be inserted at the end of the message buffer.  If @code{t}
462 (which is the default), the @code{message-signature-file} file will be
463 inserted instead.  If a function, the result from the function will be
464 used instead.  If a form, the result from the form will be used instead.
465 If this variable is @code{nil}, no signature will be inserted at all.
466
467 @item message-signature-file
468 @vindex message-signature-file
469 File containing the signature to be inserted at the end of the buffer.
470 The default is @samp{~/.signature}.
471
472 @end table
473
474 Note that RFC1036 says that a signature should be preceded by the three
475 characters @samp{-- } on a line by themselves.  This is to make it
476 easier for the recipient to automatically recognize and process the
477 signature.  So don't remove those characters, even though you might feel
478 that they ruin you beautiful design, like, totally.
479
480 Also note that no signature should be more than four lines long.
481 Including ASCII graphics is an efficient way to get everybody to believe
482 that you are silly and have nothing important to say.
483
484
485
486 @node Various Commands
487 @section Various Commands
488
489 @table @kbd
490
491 @item C-c C-r
492 @kindex C-c C-r 
493 @findex message-caesar-buffer-body
494 Caesar rotate (aka. rot13) the current message
495 (@code{message-caesar-buffer-body}).  If narrowing is in effect, just
496 rotate the visible portion of the buffer.  A numerical prefix says how
497 many places to rotate the text.  The default is 13.
498
499 @item C-c C-t
500 @kindex C-c C-t 
501 @findex message-insert-to
502 Insert a @code{To} header that contains the @code{Reply-To} or
503 @code{From} header of the message you're following up
504 (@code{message-insert-to}). 
505
506 @item C-c C-n
507 @kindex C-c C-n 
508 @findex message-insert-newsgroups
509 Insert a @code{Newsgroups} header that reflects the @code{Followup-To}
510 or @code{Newsgroups} header of the article you're replying to
511 (@code{message-insert-newsgroups}).
512
513 @item C-c M-r
514 @kindex C-c M-r
515 @findex message-rename-buffer
516 Rename the buffer (@code{message-rename-buffer}).  If given a prefix,
517 prompt for a new buffer name.
518
519 @end table
520
521
522 @node Sending
523 @section Sending
524
525 @table @kbd
526 @item C-c C-c
527 @kindex C-c C-c 
528 @findex message-send-and-exit
529 Send the message and bury the current buffer
530 (@code{message-send-and-exit}). 
531
532 @item C-c C-s
533 @kindex C-c C-s 
534 @findex message-send
535 Send the message (@code{message-send}). 
536
537 @item C-c C-d
538 @kindex C-c C-d
539 @findex message-dont-send
540 Bury the message buffer and exit (@code{message-dont-send}).
541
542 @item C-c C-k
543 @kindex C-c C-k
544 @findex message-kill-buffer
545 Kill the message buffer and exit (@code{message-kill-buffer}).
546
547 @end table
548
549
550 @node Variables
551 @chapter Variables
552
553 @menu
554 * Message Headers::             General message header stuff.
555 * Mail Headers::                Customizing mail headers.
556 * Mail Variables::              Other mail variables.
557 * News Headers::                Customizing news headers.
558 * News Variables::              Other news variables.
559 * Various Message Variables::   Other message variables.
560 * Sending Variables::           Variables for sending.
561 * Message Buffers::             How Message names its buffers.
562 * Message Actions::             Actions to be performed when exiting.
563 @end menu
564
565
566 @node Message Headers
567 @section Message Headers
568
569 Message is quite aggressive on the message generation front.  It has
570 to be -- it's a combined news and mail agent.  To be able to send
571 combined messages, it has to generate all headers itself to ensure that
572 mail and news copies of messages look sufficiently similar.
573
574 @table @code
575
576 @item message-generate-headers-first
577 @vindex message-generate-headers-first
578 If non-@code{nil}, generate all headers before starting to compose the
579 message.  
580
581 @item message-from-style
582 @vindex message-from-style
583 Specifies how @code{From} headers should look.  There are four legal
584 values:
585
586 @table @code
587 @item nil
588 Just the address -- @samp{king@@grassland.com}.
589
590 @item parens
591 @samp{king@@grassland.com (Elvis Parsley)}.
592
593 @item angles
594 @samp{Elvis Parsley <king@@grassland.com>}.
595
596 @item default
597 Look like @code{angles} if that doesn't require quoting, and
598 @code{parens} if it does.  If even @code{parens} requires quoting, use
599 @code{angles} anyway.
600
601 @end table
602
603 @item message-deletable-headers
604 @vindex message-deletable-headers
605 Headers in this list that were previously generated by Message will be
606 deleted before posting.  Let's say you post an article.  Then you decide
607 to post it again to some other group, you naughty boy, so you jump back
608 to the @code{*post-buf*} buffer, edit the @code{Newsgroups} line, and
609 ship it off again.  By default, this variable makes sure that the old
610 generated @code{Message-ID} is deleted, and a new one generated.  If
611 this isn't done, the entire empire would probably crumble, anarchy would
612 prevail, and cats would start walking on two legs and rule the world.
613 Allegedly.  
614
615 @item message-default-headers
616 @vindex message-default-headers
617 This string is inserted at the end of the headers in all message
618 buffers.
619
620 @end table
621
622
623 @node Mail Headers
624 @section Mail Headers
625
626 @table @code
627 @item message-required-mail-headers
628 @vindex message-required-mail-headers
629 See @pxref{News Headers} for the syntax of this variable.  It is
630 @code{(From Date Subject (optional . In-Reply-To) Message-ID Lines
631 (optional . X-Mailer))} by default.
632
633 @item message-ignored-mail-headers
634 @vindex message-ignored-mail-headers
635 Regexp of headers to be removed before mailing.  The default is
636 @samp{^Gcc:\\|^Fcc:}. 
637
638 @item message-default-mail-headers
639 @vindex message-default-mail-headers
640 This string is inserted at the end of the headers in all message
641 buffers that are initialized as mail.
642
643 @end table
644
645
646 @node Mail Variables
647 @section Mail Variables 
648
649 @table @code
650 @item message-send-mail-function
651 @vindex message-send-mail-function
652 Function used to send the current buffer as mail.  The default is
653 @code{message-send-mail-with-sendmail}.   If you prefer using MH
654 instead, set this variable to @code{message-send-mail-with-mh}.
655
656 @end table
657
658
659 @node News Headers
660 @section News Headers
661
662 @vindex message-required-news-headers
663 @code{message-required-news-headers} a list of header symbols.  These
664 headers will either be automatically generated, or, if that's
665 impossible, they will be prompted for.  The following symbols are legal:
666
667 @table @code
668
669 @item From
670 @cindex From
671 @findex user-full-name
672 @findex user-mail-address
673 This required header will be filled out with the result of the
674 @code{message-make-from} function, which depends on the
675 @code{message-from-style}, @code{user-full-name},
676 @code{user-mail-address} variables.
677
678 @item Subject
679 @cindex Subject
680 This required header will be prompted for if not present already. 
681
682 @item Newsgroups
683 @cindex Newsgroups
684 This required header says which newsgroups the article is to be posted
685 to.  If it isn't present already, it will be prompted for.
686
687 @item Organization
688 @cindex organization
689 This optional header will be filled out depending on the
690 @code{message-user-organization} variable.
691 @code{message-user-organization-file} will be used if that variable is
692 @code{t}.
693
694 @item Lines
695 @cindex Lines
696 This optional header will be computed by Message.
697
698 @item Message-ID
699 @cindex Message-ID
700 @vindex mail-host-address
701 @findex system-name
702 @cindex Sun
703 This required header will be generated by Message.  A unique ID will be
704 created based on date, time, user name and system name.  Message will
705 use @code{mail-host-address} as the fully qualified domain name (FQDN)
706 of the machine if that variable is define.  If not, it will use
707 @code{system-name}, which doesn't report a FQDN on some machines --
708 notably Suns.
709
710 @item X-Newsreader
711 @cindex X-Newsreader
712 This optional header will be filled out according to the
713 @code{message-newsreader} local variable.
714
715 @item X-Mailer
716 This optional header will be filled out according to the
717 @code{message-mailer} local variable, unless there already is an
718 @code{X-Newsreader} header present.
719
720 @item In-Reply-To
721 This optional header is filled out using the @code{Date} and @code{From}
722 header of the article being replied.
723
724 @item Expires
725 @cindex Expires
726 This extremely optional header will be inserted according to the
727 @code{message-expires} variable.  It is highly deprecated and shouldn't
728 be used unless you know what you're doing.
729
730 @item Distribution
731 @cindex Distribution
732 This optional header is filled out according to the
733 @code{message-distribution-function} variable.  It is a deprecated and
734 much misunderstood header.
735
736 @item Path
737 @cindex path
738 This extremely optional header should probably not ever be used.
739 However, some @emph{very} old servers require that this header is
740 present.  @code{message-user-path} further controls how this
741 @code{Path} header is to look.  If is is @code{nil}, the the server name
742 as the leaf node.  If is is a string, use the string.  If it is neither
743 a string nor @code{nil}, use the user name only.  However, it is highly
744 unlikely that you should need to fiddle with this variable at all.
745 @end table
746
747 @findex yow
748 @cindex Mime-Version
749 In addition, you can enter conses into this list.  The car of this cons
750 should be a symbol.  This symbol's name is the name of the header, and
751 the cdr can either be a string to be entered verbatim as the value of
752 this header, or it can be a function to be called.  This function should
753 return a string to be inserted.  For instance, if you want to insert
754 @code{Mime-Version: 1.0}, you should enter @code{(Mime-Version . "1.0")}
755 into the list.  If you want to insert a funny quote, you could enter
756 something like @code{(X-Yow . yow)} into the list.  The function
757 @code{yow} will then be called without any arguments.
758
759 If the list contains a cons where the car of the cons is
760 @code{optional}, the cdr of this cons will only be inserted if it is
761 non-@code{nil}.
762
763 Other variables for customizing outgoing news articles:
764
765 @table @code
766
767 @item message-syntax-checks
768 @vindex message-syntax-checks
769 If non-@code{nil}, message will attempt to check the legality of the
770 headers, as well as some other stuff, before posting.  You can control
771 the granularity of the check by adding or removing elements from this
772 list.  Legal elements are:
773
774 @table @code
775 @item subject-cmsg 
776 Check the subject for commands.
777 @item sender
778 @cindex Sender
779 Insert a new @code{Sender} header if the @code{From} header looks odd. 
780 @item multiple-headers 
781 Check for the existence of multiple equal headers.
782 @item sendsys 
783 @cindex sendsys
784 Check for the existence of version and sendsys commands.
785 @item message-id
786 Check whether the @code{Message-ID} looks ok.
787 @item from
788 Check whether the @code{From} header seems nice.
789 @item long-lines 
790 @cindex long lines
791 Check for too long lines.
792 @item control-chars
793 Check for illegal characters.
794 @item size
795 Check for excessive size.
796 @item new-text
797 Check whether there is any new text in the messages.
798 @item signature
799 Check the length of the signature.
800 @item approved
801 @cindex approved
802 Check whether the article has an @code{Approved} header, which is
803 something only moderators should include.
804 @item empty
805 Check whether the article is empty.
806 @item empty-headers
807 Check whether any of the headers are empty.
808 @item existing-newsgroups
809 Check whether the newsgroups mentioned in the Newsgroups and 
810 Followup-To headers exist.
811 @item valid-newsgroups
812 Check whether the @code{Newsgroups} and @code{Followup-to} headers
813 are valid syntactically.
814 @item shorten-followup-to
815 Check whether to add a @code{Followup-to} header to shorten the number
816 of groups to post to.
817 @end table
818
819 All these conditions are checked by default.
820
821 @item message-ignored-news-headers
822 @vindex message-ignored-news-headers
823 Regexp of headers to be removed before posting.  The default is
824 @samp{^NNTP-Posting-Host:\\|^Xref:\\|^Bcc:\\|^Gcc:\\|^Fcc:}. 
825
826 @item message-default-news-headers
827 @vindex message-default-news-headers
828 This string is inserted at the end of the headers in all message
829 buffers that are initialized as news.
830
831 @end table
832
833
834 @node News Variables
835 @section News Variables
836
837 @table @code
838 @item message-send-news-function
839 @vindex message-send-news-function
840 Function used to send the current buffer as news.  The default is
841 @code{message-send-news}. 
842
843 @item message-post-method
844 @vindex message-post-method
845 Method used for posting a prepared news message.
846
847 @end table
848
849
850 @node Various Message Variables
851 @section Various Message Variables
852
853 @table @code
854 @item message-signature-separator
855 @vindex message-signature-separator
856 Regexp matching the signature separator.  It is @samp{^-- *$} by
857 default. 
858
859 @item mail-header-separator
860 @vindex mail-header-separator
861 String used to separate the headers from the body.  It is @samp{--text
862 follows this line--} by default.
863
864 @item message-directory
865 @vindex message-directory
866 Directory used by many mailey things.  The default is @file{~/Mail/}. 
867
868 @item message-autosave-directory
869 @vindex message-autosave-directory
870 Directory where message buffers will be autosaved to.
871
872 @item message-signature-setup-hook
873 @vindex message-signature-setup-hook
874 Hook run when initializing the message buffer.  It is run after the
875 headers have been inserted but before the signature has been inserted. 
876
877 @item message-setup-hook
878 @vindex message-setup-hook
879 Hook run as the last thing when the message buffer has been initialized.
880
881 @item message-header-setup-hook
882 @vindex message-header-setup-hook
883 Hook called narrowed to the headers after initializing the headers. 
884
885 @item message-send-hook
886 @vindex message-send-hook
887 Hook run before sending messages.
888
889 @item message-sent-hook
890 @vindex message-sent-hook
891 Hook run after sending messages.
892
893 @item message-mode-syntax-table
894 @vindex message-mode-syntax-table
895 Syntax table used in message mode buffers.
896
897 @end table
898
899
900
901 @node Sending Variables
902 @section Sending Variables
903
904 @table @code
905
906 @item message-fcc-handler-function 
907 @vindex message-fcc-handler-function 
908 A function called to save outgoing articles.  This function will be
909 called with the name of the file to store the article in. The default
910 function is @code{rmail-output} which saves in Unix mailbox format.
911
912 @item message-courtesy-message
913 @vindex message-courtesy-message
914 When sending combined messages, this string is inserted at the start of
915 the mailed copy.  If the string contains the format spec @samp{%s}, the
916 newsgroups the article has been posted to will be inserted there.  If
917 this variable is @code{nil}, no such courtesy message will be added.
918 The default value is @samp{"The following message is a courtesy copy of
919 an article\nthat has been posted to %s as well.\n\n"}. 
920
921 @end table
922
923
924 @node Message Buffers
925 @section Message Buffers
926
927 Message will generate new buffers with unique buffer names when you
928 request a message buffer.  When you send the message, the buffer isn't
929 normally killed off.  It's name is changed and a certain number of old
930 message buffers are kept alive.
931
932 @table @code
933 @item message-generate-new-buffers
934 @vindex message-generate-new-buffers
935 If non-@code{nil}, generate new buffers.  The default is @code{t}.  If
936 this is a function, call that function with three parameters: The type,
937 the to address and the group name.  (Any of these may be @code{nil}.)
938 The function should return the new buffer name.
939
940 @item message-max-buffers
941 @vindex message-max-buffers
942 This variable says how many old message buffers to keep.  If there are
943 more message buffers than this, the oldest buffer will be killed.  The
944 default is 10.  If this variable is @code{nil}, no old message buffers
945 will ever be killed.
946
947 @item message-send-rename-function
948 @vindex message-send-rename-function
949 After sending a message, the buffer is renamed from, for instance,
950 @samp{*reply to Lars*} to @samp{*sent reply to Lars*}.  If you don't
951 like this, set this variable to a function that renames the buffer in a
952 manner you like.  If you don't want to rename the buffer at all, you can
953 say:
954
955 @lisp
956 (setq message-send-rename-function 'ignore)
957 @end lisp
958
959 @item message-kill-buffer-on-exit
960 @findex message-kill-buffer-on-exit
961 If non-@code{nil}, kill the buffer immediately on exit.
962
963 @end table
964
965
966 @node Message Actions
967 @section Message Actions
968
969 When Message is being used from a news/mail reader, the reader is likely
970 to want to perform some task after the message has been sent.  Perhaps
971 return to the previous window configuration or mark an article as
972 replied.  
973
974 @vindex message-kill-actions
975 @vindex message-postpone-actions
976 @vindex message-exit-actions
977 @vindex message-send-actions
978 The user may exit from the message buffer in various ways.  The most
979 common is @kbd{C-c C-c}, which sends the message and exits.  Other
980 possibilities are @kbd{C-c C-s} which just sends the message, @kbd{C-c
981 C-d} which postpones the message editing and buries the message buffer,
982 and @kbd{C-c C-k} which kills the message buffer.  Each of these actions
983 have lists associated with them that contains actions to be executed:
984 @code{message-send-actions}, @code{message-exit-actions},
985 @code{message-postpone-actions}, and @code{message-kill-actions}.  
986
987 Message provides a function to interface with these lists:
988 @code{message-add-action}.  The first parameter is the action to be
989 added, and the rest of the arguments are which lists to add this action
990 to.  Here's an example from Gnus:
991
992 @lisp
993   (message-add-action
994    `(set-window-configuration ,(current-window-configuration))
995    'exit 'postpone 'kill)
996 @end lisp
997
998 This restores the Gnus window configuration when the message buffer is
999 killed, postponed or exited.
1000
1001 An @dfn{action} can be either a normal function; or a list where the
1002 @code{car} is a function and the @code{cdr} is the list of arguments; or
1003 a form to be @code{eval}ed.
1004
1005 @node Index
1006 @chapter Index
1007 @printindex cp
1008
1009 @node Key Index
1010 @chapter Key Index
1011 @printindex ky
1012
1013 @summarycontents
1014 @contents
1015 @bye
1016
1017 @c End: