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