message.texi 41.5 KB
Newer Older
Dave Love's avatar
#  
Dave Love committed
1 2
\input texinfo                  @c -*-texinfo-*-

3
@setfilename ../info/message
Dave Love's avatar
Dave Love committed
4
@settitle Message 5.9.0 Manual
Dave Love's avatar
#  
Dave Love committed
5 6 7
@synindex fn cp
@synindex vr cp
@synindex pg cp
Dave Love's avatar
Dave Love committed
8
@dircategory Emacs
Dave Love's avatar
#  
Dave Love committed
9 10 11 12 13 14 15 16
@direntry
* Message: (message).   Mail and news composition mode that goes with Gnus.
@end direntry
@iftex
@finalout
@end iftex
@setchapternewpage odd

Dave Love's avatar
Dave Love committed
17
@ifnottex
Dave Love's avatar
#  
Dave Love committed
18 19 20

This file documents Message, the Emacs message composition mode.

Dave Love's avatar
Dave Love committed
21
Copyright (C) 1996,97,98,99,2000 Free Software Foundation, Inc.
Dave Love's avatar
#  
Dave Love committed
22

Dave Love's avatar
Dave Love committed
23 24
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1 or
Dave Love's avatar
Dave Love committed
25 26
any later version published by the Free Software Foundation; with no
Invariant Sections, with the Front-Cover texts being ``A GNU
Dave Love's avatar
Dave Love committed
27 28
Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
license is included in the section entitled ``GNU Free Documentation
Dave Love's avatar
Dave Love committed
29
License'' in the Emacs manual.
Dave Love's avatar
#  
Dave Love committed
30

Dave Love's avatar
Dave Love committed
31 32 33
(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
this GNU Manual, like GNU software.  Copies published by the Free
Software Foundation raise funds for GNU development.''
Dave Love's avatar
Dave Love committed
34 35 36 37 38

This document is part of a collection distributed under the GNU Free
Documentation License.  If you want to distribute this document
separately from the collection, you can do so by adding a copy of the
license to the document, as described in section 6 of the license.
Dave Love's avatar
Dave Love committed
39
@end ifnottex
Dave Love's avatar
#  
Dave Love committed
40 41 42 43

@tex

@titlepage
Dave Love's avatar
Dave Love committed
44
@title Message 5.9.0 Manual
Dave Love's avatar
#  
Dave Love committed
45 46 47 48 49

@author by Lars Magne Ingebrigtsen
@page

@vskip 0pt plus 1filll
Dave Love's avatar
Dave Love committed
50 51 52 53 54 55 56 57
Copyright @copyright{} 1996,97,98,99,2000 Free Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1 or
any later version published by the Free Software Foundation; with the
Invariant Sections being none, with the Front-Cover texts being ``A GNU
Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
license is included in the section entitled ``GNU Free Documentation
Dave Love's avatar
Dave Love committed
58
License'' in the Emacs manual.
Dave Love's avatar
Dave Love committed
59 60 61 62

(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
this GNU Manual, like GNU software.  Copies published by the Free
Software Foundation raise funds for GNU development.''
Dave Love's avatar
Dave Love committed
63 64 65 66 67

This document is part of a collection distributed under the GNU Free
Documentation License.  If you want to distribute this document
separately from the collection, you can do so by adding a copy of the
license to the document, as described in section 6 of the license.
Dave Love's avatar
#  
Dave Love committed
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
@end titlepage
@page

@end tex

@node Top
@top Message

All message composition from Gnus (both mail and news) takes place in
Message mode buffers.

@menu
* Interface::         Setting up message buffers.
* Commands::          Commands you can execute in message mode buffers.
* Variables::         Customizing the message buffers.
* Compatibility::     Making Message backwards compatible.
* Appendices::        More technical things.
* Index::             Variable, function and concept index.
* Key Index::         List of Message mode keys.
@end menu

Dave Love's avatar
Dave Love committed
89 90
This manual corresponds to Message 5.9.0.  Message is distributed with
the Gnus distribution bearing the same version number as this manual.
Dave Love's avatar
#  
Dave Love committed
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120


@node Interface
@chapter Interface

When a program (or a person) wants to respond to a message -- reply,
follow up, forward, cancel -- the program (or person) should just put
point in the buffer where the message is and call the required command.
@code{Message} will then pop up a new @code{message} mode buffer with
appropriate headers filled out, and the user can edit the message before
sending it.

@menu
* New Mail Message::     Editing a brand new mail message.
* New News Message::     Editing a brand new news message.
* Reply::                Replying via mail.
* Wide Reply::           Responding to all people via mail.
* Followup::             Following up via news.
* Canceling News::       Canceling a news article.
* Superseding::          Superseding a message.
* Forwarding::           Forwarding a message via news or mail.
* Resending::            Resending a mail message.
* Bouncing::             Bouncing a mail message.
@end menu


@node New Mail Message
@section New Mail Message

@findex message-mail
Dave Love's avatar
Dave Love committed
121
The @code{message-mail} command pops up a new message buffer.
Dave Love's avatar
#  
Dave Love committed
122 123 124 125 126 127 128 129 130 131

Two optional parameters are accepted: The first will be used as the
@code{To} header and the second as the @code{Subject} header.  If these
are @code{nil}, those two headers will be empty.


@node New News Message
@section New News Message

@findex message-news
Dave Love's avatar
Dave Love committed
132
The @code{message-news} command pops up a new message buffer.
Dave Love's avatar
#  
Dave Love committed
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157

This function accepts two optional parameters.  The first will be used
as the @code{Newsgroups} header and the second as the @code{Subject}
header.  If these are @code{nil}, those two headers will be empty.


@node Reply
@section Reply

@findex message-reply
The @code{message-reply} function pops up a message buffer that's a
reply to the message in the current buffer.

@vindex message-reply-to-function
Message uses the normal methods to determine where replies are to go
(@pxref{Responses}), but you can change the behavior to suit your needs
by fiddling with the @code{message-reply-to-function} variable.

If you want the replies to go to the @code{Sender} instead of the
@code{From}, you could do something like this:

@lisp
(setq message-reply-to-function
      (lambda ()
       (cond ((equal (mail-fetch-field "from") "somebody")
Dave Love's avatar
Dave Love committed
158 159
               (list (cons 'To (mail-fetch-field "sender"))))
             (t
Dave Love's avatar
#  
Dave Love committed
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174
              nil))))
@end lisp

This function will be called narrowed to the head of the article that is
being replied to.

As you can see, this function should return a string if it has an
opinion as to what the To header should be.  If it does not, it should
just return @code{nil}, and the normal methods for determining the To
header will be used.

This function can also return a list.  In that case, each list element
should be a cons, where the car should be the name of an header
(eg. @code{Cc}) and the cdr should be the header value
(eg. @samp{larsi@@ifi.uio.no}).  All these headers will be inserted into
Dave Love's avatar
Dave Love committed
175
the head of the outgoing mail.
Dave Love's avatar
#  
Dave Love committed
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190


@node Wide Reply
@section Wide Reply

@findex message-wide-reply
The @code{message-wide-reply} pops up a message buffer that's a wide
reply to the message in the current buffer.  A @dfn{wide reply} is a
reply that goes out to all people listed in the @code{To}, @code{From}
(or @code{Reply-to}) and @code{Cc} headers.

@vindex message-wide-reply-to-function
Message uses the normal methods to determine where wide replies are to go,
but you can change the behavior to suit your needs by fiddling with the
@code{message-wide-reply-to-function}.  It is used in the same way as
Dave Love's avatar
Dave Love committed
191
@code{message-reply-to-function} (@pxref{Reply}).
Dave Love's avatar
#  
Dave Love committed
192

Dave Love's avatar
Dave Love committed
193 194
@findex message-dont-reply-to-names
Addresses that match the @code{message-dont-reply-to-names} regular
Dave Love's avatar
#  
Dave Love committed
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250
expression will be removed from the @code{Cc} header.


@node Followup
@section Followup

@findex message-followup
The @code{message-followup} command pops up a message buffer that's a
followup to the message in the current buffer.

@vindex message-followup-to-function
Message uses the normal methods to determine where followups are to go,
but you can change the behavior to suit your needs by fiddling with the
@code{message-followup-to-function}.  It is used in the same way as
@code{message-reply-to-function} (@pxref{Reply}).

@vindex message-use-followup-to
The @code{message-use-followup-to} variable says what to do about
@code{Followup-To} headers.  If it is @code{use}, always use the value.
If it is @code{ask} (which is the default), ask whether to use the
value.  If it is @code{t}, use the value unless it is @samp{poster}.  If
it is @code{nil}, don't use the value.


@node Canceling News
@section Canceling News

@findex message-cancel-news
The @code{message-cancel-news} command cancels the article in the
current buffer.


@node Superseding
@section Superseding

@findex message-supersede
The @code{message-supersede} command pops up a message buffer that will
supersede the message in the current buffer.

@vindex message-ignored-supersedes-headers
Headers matching the @code{message-ignored-supersedes-headers} are
removed before popping up the new message buffer.  The default is@*
@samp{^Path:\\|^Date\\|^NNTP-Posting-Host:\\|^Xref:\\|^Lines:\\|@*
^Received:\\|^X-From-Line:\\|Return-Path:\\|^Supersedes:}.



@node Forwarding
@section Forwarding

@findex message-forward
The @code{message-forward} command pops up a message buffer to forward
the message in the current buffer.  If given a prefix, forward using
news.

@table @code
Dave Love's avatar
Dave Love committed
251 252 253
@item message-forward-ignored-headers
@vindex message-forward-ignored-headers
All headers that match this regexp will be deleted when forwarding a message.
Dave Love's avatar
#  
Dave Love committed
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275

@item message-make-forward-subject-function
@vindex message-make-forward-subject-function
A list of functions that are called to generate a subject header for
forwarded messages.  The subject generated by the previous function is
passed into each successive function.

The provided functions are:

@table @code
@item message-forward-subject-author-subject
@findex message-forward-subject-author-subject
Source of article (author or newsgroup), in brackets followed by the
subject.

@item message-forward-subject-fwd
Subject of article with @samp{Fwd:} prepended to it.
@end table

@item message-wash-forwarded-subjects
@vindex message-wash-forwarded-subjects
If this variable is @code{t}, the subjects of forwarded messages have
Dave Love's avatar
Dave Love committed
276
the evidence of previous forwards (such as @samp{Fwd:}, @samp{Re:},
Dave Love's avatar
#  
Dave Love committed
277 278 279
@samp{(fwd)}) removed before the new subject is
constructed.  The default value is @code{nil}.

Dave Love's avatar
Dave Love committed
280 281 282 283 284 285
@item message-forward-as-mime
@vindex message-forward-as-mime
If this variable is @code{t} (the default), forwarded messages are
included as inline MIME RFC822 parts.  If it's @code{nil}, forwarded
messages will just be copied inline to the new message, like previous,
non MIME-savvy versions of gnus would do.
Dave Love's avatar
#  
Dave Love committed
286 287 288 289 290 291 292 293 294 295 296 297 298
@end table


@node Resending
@section Resending

@findex message-resend
The @code{message-resend} command will prompt the user for an address
and resend the message in the current buffer to that address.

@vindex message-ignored-resent-headers
Headers that match the @code{message-ignored-resent-headers} regexp will
be removed before sending the message.  The default is
Dave Love's avatar
Dave Love committed
299
@samp{^Return-receipt}.
Dave Love's avatar
#  
Dave Love committed
300 301 302 303 304 305 306 307 308 309


@node Bouncing
@section Bouncing

@findex message-bounce
The @code{message-bounce} command will, if the current buffer contains a
bounced mail message, pop up a message buffer stripped of the bounce
information.  A @dfn{bounced message} is typically a mail you've sent
out that has been returned by some @code{mailer-daemon} as
Dave Love's avatar
Dave Love committed
310
undeliverable.
Dave Love's avatar
#  
Dave Love committed
311 312 313 314 315 316 317 318 319 320 321 322 323 324

@vindex message-ignored-bounced-headers
Headers that match the @code{message-ignored-bounced-headers} regexp
will be removed before popping up the buffer.  The default is
@samp{^\\(Received\\|Return-Path\\):}.


@node Commands
@chapter Commands

@menu
* Header Commands::     Commands for moving to headers.
* Movement::            Moving around in message buffers.
* Insertion::           Inserting things into message buffers.
Dave Love's avatar
Dave Love committed
325
* MIME::                @sc{mime} considerations.
Dave Love's avatar
#  
Dave Love committed
326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345
* Various Commands::    Various things.
* Sending::             Actually sending the message.
* Mail Aliases::        How to use mail aliases.
@end menu


@node Header Commands
@section Header Commands

All these commands move to the header in question.  If it doesn't exist,
it will be inserted.

@table @kbd

@item C-c ?
@kindex C-c ?
@findex message-goto-to
Describe the message mode.

@item C-c C-f C-t
Dave Love's avatar
Dave Love committed
346
@kindex C-c C-f C-t
Dave Love's avatar
#  
Dave Love committed
347 348 349 350
@findex message-goto-to
Go to the @code{To} header (@code{message-goto-to}).

@item C-c C-f C-b
Dave Love's avatar
Dave Love committed
351
@kindex C-c C-f C-b
Dave Love's avatar
#  
Dave Love committed
352 353 354
@findex message-goto-bcc
Go to the @code{Bcc} header (@code{message-goto-bcc}).

Dave Love's avatar
Dave Love committed
355 356
@item C-c C-f C-w
@kindex C-c C-f C-w
Dave Love's avatar
#  
Dave Love committed
357 358 359 360
@findex message-goto-fcc
Go to the @code{Fcc} header (@code{message-goto-fcc}).

@item C-c C-f C-c
Dave Love's avatar
Dave Love committed
361
@kindex C-c C-f C-c
Dave Love's avatar
#  
Dave Love committed
362 363 364 365
@findex message-goto-cc
Go to the @code{Cc} header (@code{message-goto-cc}).

@item C-c C-f C-s
Dave Love's avatar
Dave Love committed
366
@kindex C-c C-f C-s
Dave Love's avatar
#  
Dave Love committed
367 368 369 370
@findex message-goto-subject
Go to the @code{Subject} header (@code{message-goto-subject}).

@item C-c C-f C-r
Dave Love's avatar
Dave Love committed
371
@kindex C-c C-f C-r
Dave Love's avatar
#  
Dave Love committed
372 373 374 375
@findex message-goto-reply-to
Go to the @code{Reply-To} header (@code{message-goto-reply-to}).

@item C-c C-f C-n
Dave Love's avatar
Dave Love committed
376
@kindex C-c C-f C-n
Dave Love's avatar
#  
Dave Love committed
377 378 379 380
@findex message-goto-newsgroups
Go to the @code{Newsgroups} header (@code{message-goto-newsgroups}).

@item C-c C-f C-d
Dave Love's avatar
Dave Love committed
381
@kindex C-c C-f C-d
Dave Love's avatar
#  
Dave Love committed
382 383 384
@findex message-goto-distribution
Go to the @code{Distribution} header (@code{message-goto-distribution}).

Dave Love's avatar
Dave Love committed
385 386
@item C-c C-f C-f
@kindex C-c C-f C-f
Dave Love's avatar
#  
Dave Love committed
387 388 389 390
@findex message-goto-followup-to
Go to the @code{Followup-To} header (@code{message-goto-followup-to}).

@item C-c C-f C-k
Dave Love's avatar
Dave Love committed
391
@kindex C-c C-f C-k
Dave Love's avatar
#  
Dave Love committed
392 393 394 395
@findex message-goto-keywords
Go to the @code{Keywords} header (@code{message-goto-keywords}).

@item C-c C-f C-u
Dave Love's avatar
Dave Love committed
396
@kindex C-c C-f C-u
Dave Love's avatar
#  
Dave Love committed
397 398 399 400 401 402 403 404 405 406 407
@findex message-goto-summary
Go to the @code{Summary} header (@code{message-goto-summary}).

@end table


@node Movement
@section Movement

@table @kbd
@item C-c C-b
Dave Love's avatar
Dave Love committed
408
@kindex C-c C-b
Dave Love's avatar
#  
Dave Love committed
409 410
@findex message-goto-body
Move to the beginning of the body of the message
Dave Love's avatar
Dave Love committed
411
(@code{message-goto-body}).
Dave Love's avatar
#  
Dave Love committed
412 413

@item C-c C-i
Dave Love's avatar
Dave Love committed
414
@kindex C-c C-i
Dave Love's avatar
#  
Dave Love committed
415 416 417 418 419 420 421 422 423 424 425 426
@findex message-goto-signature
Move to the signature of the message (@code{message-goto-signature}).

@end table


@node Insertion
@section Insertion

@table @kbd

@item C-c C-y
Dave Love's avatar
Dave Love committed
427
@kindex C-c C-y
Dave Love's avatar
#  
Dave Love committed
428 429
@findex message-yank-original
Yank the message that's being replied to into the message buffer
Dave Love's avatar
Dave Love committed
430 431 432 433 434 435 436
(@code{message-yank-original}).

@item C-c M-C-y
@kindex C-c M-C-y
@findex message-yank-buffer
Prompt for a buffer name and yank the contents of that buffer into the
message buffer (@code{message-yank-buffer}).
Dave Love's avatar
#  
Dave Love committed
437 438

@item C-c C-q
Dave Love's avatar
Dave Love committed
439
@kindex C-c C-q
Dave Love's avatar
#  
Dave Love committed
440 441 442 443 444 445 446 447
@findex message-fill-yanked-message
Fill the yanked message (@code{message-fill-yanked-message}).  Warning:
Can severely mess up the yanked text if its quoting conventions are
strange.  You'll quickly get a feel for when it's safe, though.  Anyway,
just remember that @kbd{C-x u} (@code{undo}) is available and you'll be
all right.

@item C-c C-w
Dave Love's avatar
Dave Love committed
448
@kindex C-c C-w
Dave Love's avatar
#  
Dave Love committed
449 450
@findex message-insert-signature
Insert a signature at the end of the buffer
Dave Love's avatar
Dave Love committed
451 452 453 454 455 456
(@code{message-insert-signature}).

@item C-c M-h
@kindex C-c M-h
@findex message-insert-headers
Insert the message headers (@code{message-insert-headers}).
Dave Love's avatar
#  
Dave Love committed
457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538

@end table

@table @code
@item message-ignored-cited-headers
@vindex message-ignored-cited-headers
All headers that match this regexp will be removed from yanked
messages.  The default is @samp{.}, which means that all headers will be
removed.

@item message-citation-line-function
@vindex message-citation-line-function
Function called to insert the citation line.  The default is
@code{message-insert-citation-line}, which will lead to citation lines
that look like:

@example
Hallvard B Furuseth <h.b.furuseth@@usit.uio.no> writes:
@end example

Point will be at the beginning of the body of the message when this
function is called.

@item message-yank-prefix
@vindex message-yank-prefix
@cindex yanking
@cindex quoting
When you are replying to or following up an article, you normally want
to quote the person you are answering.  Inserting quoted text is done by
@dfn{yanking}, and each quoted line you yank will have
@code{message-yank-prefix} prepended to it.  The default is @samp{> }.

@item message-indentation-spaces
@vindex message-indentation-spaces
Number of spaces to indent yanked messages.

@item message-cite-function
@vindex message-cite-function
@findex message-cite-original
@findex sc-cite-original
@findex message-cite-original-without-signature
@cindex Supercite
Function for citing an original message.  The default is
@code{message-cite-original}, which simply inserts the original message
and prepends @samp{> } to each line.
@code{message-cite-original-without-signature} does the same, but elides
the signature.  You can also set it to @code{sc-cite-original} to use
Supercite.

@item message-indent-citation-function
@vindex message-indent-citation-function
Function for modifying a citation just inserted in the mail buffer.
This can also be a list of functions.  Each function can find the
citation between @code{(point)} and @code{(mark t)}.  And each function
should leave point and mark around the citation text as modified.

@item message-signature
@vindex message-signature
String to be inserted at the end of the message buffer.  If @code{t}
(which is the default), the @code{message-signature-file} file will be
inserted instead.  If a function, the result from the function will be
used instead.  If a form, the result from the form will be used instead.
If this variable is @code{nil}, no signature will be inserted at all.

@item message-signature-file
@vindex message-signature-file
File containing the signature to be inserted at the end of the buffer.
The default is @samp{~/.signature}.

@end table

Note that RFC1036bis says that a signature should be preceded by the three
characters @samp{-- } on a line by themselves.  This is to make it
easier for the recipient to automatically recognize and process the
signature.  So don't remove those characters, even though you might feel
that they ruin your beautiful design, like, totally.

Also note that no signature should be more than four lines long.
Including ASCII graphics is an efficient way to get everybody to believe
that you are silly and have nothing important to say.


Dave Love's avatar
Dave Love committed
539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559
@node MIME
@section MIME
@cindex MML
@cindex MIME
@cindex multipart
@cindex attachment

Message is a @sc{mime}-compliant posting agent.  The user generally
doesn't have to do anything to make the @sc{mime} happen---Message will
automatically add the @code{Content-Type} and
@code{Content-Transfer-Encoding} headers.

The most typical thing users want to use the multipart things in
@sc{mime} for is to add ``attachments'' to mail they send out.  This can
be done with the @code{C-c C-a} command, which will prompt for a file
name and a @sc{mime} type.

You can also create arbitrarily complex multiparts using the MML
language (@pxref{Composing, , Composing, emacs-mime, The Emacs MIME
Manual}).

Dave Love's avatar
#  
Dave Love committed
560 561 562 563 564 565 566

@node Various Commands
@section Various Commands

@table @kbd

@item C-c C-r
Dave Love's avatar
Dave Love committed
567
@kindex C-c C-r
Dave Love's avatar
#  
Dave Love committed
568 569 570 571 572 573 574 575 576 577
@findex message-caesar-buffer-body
Caesar rotate (aka. rot13) the current message
(@code{message-caesar-buffer-body}).  If narrowing is in effect, just
rotate the visible portion of the buffer.  A numerical prefix says how
many places to rotate the text.  The default is 13.

@item C-c C-e
@kindex C-c C-e
@findex message-elide-region
Elide the text between point and mark (@code{message-elide-region}).
Dave Love's avatar
Dave Love committed
578 579 580
The text is killed and replaced with the contents of the variable
@code{message-elide-ellipsis}. The default value is to use an ellipsis
(@samp{[...]}).
Dave Love's avatar
#  
Dave Love committed
581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614

@item C-c C-z
@kindex C-c C-x
@findex message-kill-to-signature
Kill all the text up to the signature, or if that's missing, up to the
end of the message (@code{message-kill-to-signature}).

@item C-c C-v
@kindex C-c C-v
@findex message-delete-not-region
Delete all text in the body of the message that is outside the region
(@code{message-delete-not-region}).

@item M-RET
@kindex M-RET
@kindex message-newline-and-reformat
Insert four newlines, and then reformat if inside quoted text.

Here's an example:

@example
> This is some quoted text.  And here's more quoted text.
@end example

If point is before @samp{And} and you press @kbd{M-RET}, you'll get:

@example
> This is some quoted text.

*

> And here's more quoted text.
@end example

Dave Love's avatar
Dave Love committed
615
@samp{*} says where point will be placed.
Dave Love's avatar
#  
Dave Love committed
616 617

@item C-c C-t
Dave Love's avatar
Dave Love committed
618
@kindex C-c C-t
Dave Love's avatar
#  
Dave Love committed
619 620 621
@findex message-insert-to
Insert a @code{To} header that contains the @code{Reply-To} or
@code{From} header of the message you're following up
Dave Love's avatar
Dave Love committed
622
(@code{message-insert-to}).
Dave Love's avatar
#  
Dave Love committed
623 624

@item C-c C-n
Dave Love's avatar
Dave Love committed
625
@kindex C-c C-n
Dave Love's avatar
#  
Dave Love committed
626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644
@findex message-insert-newsgroups
Insert a @code{Newsgroups} header that reflects the @code{Followup-To}
or @code{Newsgroups} header of the article you're replying to
(@code{message-insert-newsgroups}).

@item C-c M-r
@kindex C-c M-r
@findex message-rename-buffer
Rename the buffer (@code{message-rename-buffer}).  If given a prefix,
prompt for a new buffer name.

@end table


@node Sending
@section Sending

@table @kbd
@item C-c C-c
Dave Love's avatar
Dave Love committed
645
@kindex C-c C-c
Dave Love's avatar
#  
Dave Love committed
646 647
@findex message-send-and-exit
Send the message and bury the current buffer
Dave Love's avatar
Dave Love committed
648
(@code{message-send-and-exit}).
Dave Love's avatar
#  
Dave Love committed
649 650

@item C-c C-s
Dave Love's avatar
Dave Love committed
651
@kindex C-c C-s
Dave Love's avatar
#  
Dave Love committed
652
@findex message-send
Dave Love's avatar
Dave Love committed
653
Send the message (@code{message-send}).
Dave Love's avatar
#  
Dave Love committed
654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726

@item C-c C-d
@kindex C-c C-d
@findex message-dont-send
Bury the message buffer and exit (@code{message-dont-send}).

@item C-c C-k
@kindex C-c C-k
@findex message-kill-buffer
Kill the message buffer and exit (@code{message-kill-buffer}).

@end table



@node Mail Aliases
@section Mail Aliases
@cindex mail aliases
@cindex aliases

@vindex message-mail-alias-type
The @code{message-mail-alias-type} variable controls what type of mail
alias expansion to use.  Currently only one form is supported---Message
uses @code{mailabbrev} to handle mail aliases.  If this variable is
@code{nil}, no mail alias expansion will be performed.

@code{mailabbrev} works by parsing the @file{/etc/mailrc} and
@file{~/.mailrc} files.  These files look like:

@example
alias lmi "Lars Magne Ingebrigtsen <larsi@@ifi.uio.no>"
alias ding "ding@@ifi.uio.no (ding mailing list)"
@end example

After adding lines like this to your @file{~/.mailrc} file, you should
be able to just write @samp{lmi} in the @code{To} or @code{Cc} (and so
on) headers and press @kbd{SPC} to expand the alias.

No expansion will be performed upon sending of the message---all
expansions have to be done explicitly.



@node Variables
@chapter Variables

@menu
* Message Headers::             General message header stuff.
* Mail Headers::                Customizing mail headers.
* Mail Variables::              Other mail variables.
* News Headers::                Customizing news headers.
* News Variables::              Other news variables.
* Various Message Variables::   Other message variables.
* Sending Variables::           Variables for sending.
* Message Buffers::             How Message names its buffers.
* Message Actions::             Actions to be performed when exiting.
@end menu


@node Message Headers
@section Message Headers

Message is quite aggressive on the message generation front.  It has to
be -- it's a combined news and mail agent.  To be able to send combined
messages, it has to generate all headers itself (instead of letting the
mail/news system do it) to ensure that mail and news copies of messages
look sufficiently similar.

@table @code

@item message-generate-headers-first
@vindex message-generate-headers-first
If non-@code{nil}, generate all headers before starting to compose the
Dave Love's avatar
Dave Love committed
727
message.
Dave Love's avatar
#  
Dave Love committed
728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760

@item message-from-style
@vindex message-from-style
Specifies how @code{From} headers should look.  There are four valid
values:

@table @code
@item nil
Just the address -- @samp{king@@grassland.com}.

@item parens
@samp{king@@grassland.com (Elvis Parsley)}.

@item angles
@samp{Elvis Parsley <king@@grassland.com>}.

@item default
Look like @code{angles} if that doesn't require quoting, and
@code{parens} if it does.  If even @code{parens} requires quoting, use
@code{angles} anyway.

@end table

@item message-deletable-headers
@vindex message-deletable-headers
Headers in this list that were previously generated by Message will be
deleted before posting.  Let's say you post an article.  Then you decide
to post it again to some other group, you naughty boy, so you jump back
to the @code{*post-buf*} buffer, edit the @code{Newsgroups} line, and
ship it off again.  By default, this variable makes sure that the old
generated @code{Message-ID} is deleted, and a new one generated.  If
this isn't done, the entire empire would probably crumble, anarchy would
prevail, and cats would start walking on two legs and rule the world.
Dave Love's avatar
Dave Love committed
761
Allegedly.
Dave Love's avatar
#  
Dave Love committed
762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779

@item message-default-headers
@vindex message-default-headers
This string is inserted at the end of the headers in all message
buffers.

@item message-subject-re-regexp
@vindex message-subject-re-regexp
Responses to messages have subjects that start with @samp{Re: }.  This
is @emph{not} an abbreviation of the English word ``response'', but in
Latin, and means ``in response to''.  Some illiterate nincompoops have
failed to grasp this fact, and have ``internationalized'' their software
to use abonimations like @samp{Aw: } (``antwort'') or @samp{Sv: }
(``svar'') instead, which is meaningless and evil.  However, you may
have to deal with users that use these evil tools, in which case you may
set this variable to a regexp that matches these prefixes.  Myself, I
just throw away non-compliant mail.

Dave Love's avatar
Dave Love committed
780 781 782 783 784
@item message-alternative-emails
@vindex message-alternative-emails
A regexp to match the alternative email addresses.  The first matched
address (not primary one) is used in the @code{From} field.

Dave Love's avatar
#  
Dave Love committed
785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811
@end table


@node Mail Headers
@section Mail Headers

@table @code
@item message-required-mail-headers
@vindex message-required-mail-headers
@xref{News Headers}, for the syntax of this variable.  It is
@code{(From Date Subject (optional . In-Reply-To) Message-ID Lines
(optional . X-Mailer))} by default.

@item message-ignored-mail-headers
@vindex message-ignored-mail-headers
Regexp of headers to be removed before mailing.  The default is
@samp{^[GF]cc:\\|^Resent-Fcc:}.

@item message-default-mail-headers
@vindex message-default-mail-headers
This string is inserted at the end of the headers in all message
buffers that are initialized as mail.

@end table


@node Mail Variables
Dave Love's avatar
Dave Love committed
812
@section Mail Variables
Dave Love's avatar
#  
Dave Love committed
813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852

@table @code
@item message-send-mail-function
@vindex message-send-mail-function
Function used to send the current buffer as mail.  The default is
@code{message-send-mail-with-sendmail}.   If you prefer using MH
instead, set this variable to @code{message-send-mail-with-mh}.

@item message-mh-deletable-headers
@vindex message-mh-deletable-headers
Most versions of MH doesn't like being fed messages that contain the
headers in this variable.  If this variable is non-@code{nil} (which is
the default), these headers will be removed before mailing when sending
messages via MH.  Set it to @code{nil} if your MH can handle these
headers.

@end table


@node News Headers
@section News Headers

@vindex message-required-news-headers
@code{message-required-news-headers} a list of header symbols.  These
headers will either be automatically generated, or, if that's
impossible, they will be prompted for.  The following symbols are valid:

@table @code

@item From
@cindex From
@findex user-full-name
@findex user-mail-address
This required header will be filled out with the result of the
@code{message-make-from} function, which depends on the
@code{message-from-style}, @code{user-full-name},
@code{user-mail-address} variables.

@item Subject
@cindex Subject
Dave Love's avatar
Dave Love committed
853
This required header will be prompted for if not present already.
Dave Love's avatar
#  
Dave Love committed
854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878

@item Newsgroups
@cindex Newsgroups
This required header says which newsgroups the article is to be posted
to.  If it isn't present already, it will be prompted for.

@item Organization
@cindex organization
This optional header will be filled out depending on the
@code{message-user-organization} variable.
@code{message-user-organization-file} will be used if this variable is
@code{t}.  This variable can also be a string (in which case this string
will be used), or it can be a function (which will be called with no
parameters and should return a string to be used).

@item Lines
@cindex Lines
This optional header will be computed by Message.

@item Message-ID
@cindex Message-ID
@vindex mail-host-address
@findex system-name
@cindex Sun
This required header will be generated by Message.  A unique ID will be
Dave Love's avatar
Dave Love committed
879 880 881 882
created based on the date, time, user name and system name.  Message
will use @code{system-name} to determine the name of the system.  If
this isn't a fully qualified domain name (FQDN), Message will use
@code{mail-host-address} as the FQDN of the machine.
Dave Love's avatar
#  
Dave Love committed
883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954

@item X-Newsreader
@cindex X-Newsreader
This optional header will be filled out according to the
@code{message-newsreader} local variable.

@item X-Mailer
This optional header will be filled out according to the
@code{message-mailer} local variable, unless there already is an
@code{X-Newsreader} header present.

@item In-Reply-To
This optional header is filled out using the @code{Date} and @code{From}
header of the article being replied to.

@item Expires
@cindex Expires
This extremely optional header will be inserted according to the
@code{message-expires} variable.  It is highly deprecated and shouldn't
be used unless you know what you're doing.

@item Distribution
@cindex Distribution
This optional header is filled out according to the
@code{message-distribution-function} variable.  It is a deprecated and
much misunderstood header.

@item Path
@cindex path
This extremely optional header should probably never be used.
However, some @emph{very} old servers require that this header is
present.  @code{message-user-path} further controls how this
@code{Path} header is to look.  If it is @code{nil}, use the server name
as the leaf node.  If it is a string, use the string.  If it is neither
a string nor @code{nil}, use the user name only.  However, it is highly
unlikely that you should need to fiddle with this variable at all.
@end table

@findex yow
@cindex Mime-Version
In addition, you can enter conses into this list.  The car of this cons
should be a symbol.  This symbol's name is the name of the header, and
the cdr can either be a string to be entered verbatim as the value of
this header, or it can be a function to be called.  This function should
return a string to be inserted.  For instance, if you want to insert
@code{Mime-Version: 1.0}, you should enter @code{(Mime-Version . "1.0")}
into the list.  If you want to insert a funny quote, you could enter
something like @code{(X-Yow . yow)} into the list.  The function
@code{yow} will then be called without any arguments.

If the list contains a cons where the car of the cons is
@code{optional}, the cdr of this cons will only be inserted if it is
non-@code{nil}.

Other variables for customizing outgoing news articles:

@table @code

@item message-syntax-checks
@vindex message-syntax-checks
Controls what syntax checks should not be performed on outgoing posts.
To disable checking of long signatures, for instance, add

@lisp
(signature . disabled)
@end lisp

to this list.

Valid checks are:

@table @code
Dave Love's avatar
Dave Love committed
955
@item subject-cmsg
Dave Love's avatar
#  
Dave Love committed
956 957 958
Check the subject for commands.
@item sender
@cindex Sender
Dave Love's avatar
Dave Love committed
959 960
Insert a new @code{Sender} header if the @code{From} header looks odd.
@item multiple-headers
Dave Love's avatar
#  
Dave Love committed
961
Check for the existence of multiple equal headers.
Dave Love's avatar
Dave Love committed
962
@item sendsys
Dave Love's avatar
#  
Dave Love committed
963 964 965 966 967 968
@cindex sendsys
Check for the existence of version and sendsys commands.
@item message-id
Check whether the @code{Message-ID} looks ok.
@item from
Check whether the @code{From} header seems nice.
Dave Love's avatar
Dave Love committed
969
@item long-lines
Dave Love's avatar
#  
Dave Love committed
970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985
@cindex long lines
Check for too long lines.
@item control-chars
Check for invalid characters.
@item size
Check for excessive size.
@item new-text
Check whether there is any new text in the messages.
@item signature
Check the length of the signature.
@item approved
@cindex approved
Check whether the article has an @code{Approved} header, which is
something only moderators should include.
@item empty
Check whether the article is empty.
Dave Love's avatar
Dave Love committed
986 987
@item invisible-text
Check whether there is any invisible text in the buffer.
Dave Love's avatar
#  
Dave Love committed
988 989 990
@item empty-headers
Check whether any of the headers are empty.
@item existing-newsgroups
Dave Love's avatar
Dave Love committed
991
Check whether the newsgroups mentioned in the @code{Newsgroups} and
Dave Love's avatar
#  
Dave Love committed
992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025
@code{Followup-To} headers exist.
@item valid-newsgroups
Check whether the @code{Newsgroups} and @code{Followup-to} headers
are valid syntactically.
@item repeated-newsgroups
Check whether the @code{Newsgroups} and @code{Followup-to} headers
contains repeated group names.
@item shorten-followup-to
Check whether to add a @code{Followup-to} header to shorten the number
of groups to post to.
@end table

All these conditions are checked by default.

@item message-ignored-news-headers
@vindex message-ignored-news-headers
Regexp of headers to be removed before posting.  The default is@*
@samp{^NNTP-Posting-Host:\\|^Xref:\\|^[BGF]cc:\\|^Resent-Fcc:}.

@item message-default-news-headers
@vindex message-default-news-headers
This string is inserted at the end of the headers in all message
buffers that are initialized as news.

@end table


@node News Variables
@section News Variables

@table @code
@item message-send-news-function
@vindex message-send-news-function
Function used to send the current buffer as news.  The default is
Dave Love's avatar
Dave Love committed
1026
@code{message-send-news}.
Dave Love's avatar
#  
Dave Love committed
1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039

@item message-post-method
@vindex message-post-method
Gnusish @dfn{select method} (see the Gnus manual for details) used for
posting a prepared news message.

@end table


@node Various Message Variables
@section Various Message Variables

@table @code
Dave Love's avatar
Dave Love committed
1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050
@item message-default-charset
@vindex message-default-charset
@cindex charset
Symbol naming a @sc{mime} charset.  Non-ASCII characters in messages are
assumed to be encoded using this charset.  The default is @code{nil},
which means ask the user.  (This variable is used only on non-@sc{mule}
Emacsen.  
@xref{Charset Translation, , Charset Translation, emacs-mime, 
      Emacs MIME Manual}, for details on the @sc{mule}-to-@sc{mime}
translation process.

Dave Love's avatar
#  
Dave Love committed
1051 1052 1053
@item message-signature-separator
@vindex message-signature-separator
Regexp matching the signature separator.  It is @samp{^-- *$} by
Dave Love's avatar
Dave Love committed
1054
default.
Dave Love's avatar
#  
Dave Love committed
1055 1056 1057 1058 1059 1060 1061 1062

@item mail-header-separator
@vindex mail-header-separator
String used to separate the headers from the body.  It is @samp{--text
follows this line--} by default.

@item message-directory
@vindex message-directory
Dave Love's avatar
Dave Love committed
1063
Directory used by many mailey things.  The default is @file{~/Mail/}.
Dave Love's avatar
#  
Dave Love committed
1064 1065 1066 1067

@item message-signature-setup-hook
@vindex message-signature-setup-hook
Hook run when initializing the message buffer.  It is run after the
Dave Love's avatar
Dave Love committed
1068
headers have been inserted but before the signature has been inserted.
Dave Love's avatar
#  
Dave Love committed
1069 1070 1071 1072 1073 1074 1075 1076

@item message-setup-hook
@vindex message-setup-hook
Hook run as the last thing when the message buffer has been initialized,
but before yanked text is inserted.

@item message-header-setup-hook
@vindex message-header-setup-hook
Dave Love's avatar
Dave Love committed
1077
Hook called narrowed to the headers after initializing the headers.
Dave Love's avatar
#  
Dave Love committed
1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106

For instance, if you're running Gnus and wish to insert a
@samp{Mail-Copies-To} header in all your news articles and all messages
you send to mailing lists, you could do something like the following:

@lisp
(defun my-message-header-setup-hook ()
  (let ((group (or gnus-newsgroup-name "")))
    (when (or (message-fetch-field "newsgroups")
              (gnus-group-find-parameter group 'to-address)
              (gnus-group-find-parameter group 'to-list))
      (insert "Mail-Copies-To: never\n"))))

(add-hook 'message-header-setup-hook
          'my-message-header-setup-hook)
@end lisp

@item message-send-hook
@vindex message-send-hook
Hook run before sending messages.

If you want to add certain headers before sending, you can use the
@code{message-add-header} function in this hook.  For instance:
@findex message-add-header

@lisp
(add-hook 'message-send-hook 'my-message-add-content)
(defun my-message-add-content ()
  (message-add-header
Dave Love's avatar
Dave Love committed
1107 1108
   "X-In-No-Sense: Nonsense"
   "X-Whatever: no"))
Dave Love's avatar
#  
Dave Love committed
1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166
@end lisp

This function won't add the header if the header is already present.

@item message-send-mail-hook
@vindex message-send-mail-hook
Hook run before sending mail messages.

@item message-send-news-hook
@vindex message-send-news-hook
Hook run before sending news messages.

@item message-sent-hook
@vindex message-sent-hook
Hook run after sending messages.

@item message-mode-syntax-table
@vindex message-mode-syntax-table
Syntax table used in message mode buffers.

@item message-send-method-alist
@vindex message-send-method-alist

Alist of ways to send outgoing messages.  Each element has the form

@lisp
(TYPE PREDICATE FUNCTION)
@end lisp

@table @var
@item type
A symbol that names the method.

@item predicate
A function called without any parameters to determine whether the
message is a message of type @var{type}.

@item function
A function to be called if @var{predicate} returns non-@code{nil}.
@var{function} is called with one parameter -- the prefix.
@end table

@lisp
((news message-news-p message-send-via-news)
 (mail message-mail-p message-send-via-mail))
@end lisp



@end table



@node Sending Variables
@section Sending Variables

@table @code

Dave Love's avatar
Dave Love committed
1167 1168
@item message-fcc-handler-function
@vindex message-fcc-handler-function
Dave Love's avatar
#  
Dave Love committed
1169
A function called to save outgoing articles.  This function will be
Dave Love's avatar
Dave Love committed
1170
called with the name of the file to store the article in.  The default
Dave Love's avatar
#  
Dave Love committed
1171 1172 1173 1174 1175 1176 1177 1178 1179
function is @code{message-output} which saves in Unix mailbox format.

@item message-courtesy-message
@vindex message-courtesy-message
When sending combined messages, this string is inserted at the start of
the mailed copy.  If the string contains the format spec @samp{%s}, the
newsgroups the article has been posted to will be inserted there.  If
this variable is @code{nil}, no such courtesy message will be added.
The default value is @samp{"The following message is a courtesy copy of
Dave Love's avatar
Dave Love committed
1180
an article\nthat has been posted to %s as well.\n\n"}.
Dave Love's avatar
#  
Dave Love committed
1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232

@end table


@node Message Buffers
@section Message Buffers

Message will generate new buffers with unique buffer names when you
request a message buffer.  When you send the message, the buffer isn't
normally killed off.  Its name is changed and a certain number of old
message buffers are kept alive.

@table @code
@item message-generate-new-buffers
@vindex message-generate-new-buffers
If non-@code{nil}, generate new buffers.  The default is @code{t}.  If
this is a function, call that function with three parameters: The type,
the to address and the group name.  (Any of these may be @code{nil}.)
The function should return the new buffer name.

@item message-max-buffers
@vindex message-max-buffers
This variable says how many old message buffers to keep.  If there are
more message buffers than this, the oldest buffer will be killed.  The
default is 10.  If this variable is @code{nil}, no old message buffers
will ever be killed.

@item message-send-rename-function
@vindex message-send-rename-function
After sending a message, the buffer is renamed from, for instance,
@samp{*reply to Lars*} to @samp{*sent reply to Lars*}.  If you don't
like this, set this variable to a function that renames the buffer in a
manner you like.  If you don't want to rename the buffer at all, you can
say:

@lisp
(setq message-send-rename-function 'ignore)
@end lisp

@item message-kill-buffer-on-exit
@findex message-kill-buffer-on-exit
If non-@code{nil}, kill the buffer immediately on exit.

@end table


@node Message Actions
@section Message Actions

When Message is being used from a news/mail reader, the reader is likely
to want to perform some task after the message has been sent.  Perhaps
return to the previous window configuration or mark an article as
Dave Love's avatar
Dave Love committed
1233
replied.
Dave Love's avatar
#  
Dave Love committed
1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245

@vindex message-kill-actions
@vindex message-postpone-actions
@vindex message-exit-actions
@vindex message-send-actions
The user may exit from the message buffer in various ways.  The most
common is @kbd{C-c C-c}, which sends the message and exits.  Other
possibilities are @kbd{C-c C-s} which just sends the message, @kbd{C-c
C-d} which postpones the message editing and buries the message buffer,
and @kbd{C-c C-k} which kills the message buffer.  Each of these actions
have lists associated with them that contains actions to be executed:
@code{message-send-actions}, @code{message-exit-actions},
Dave Love's avatar
Dave Love committed
1246
@code{message-postpone-actions}, and @code{message-kill-actions}.
Dave Love's avatar
#  
Dave Love committed
1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364

Message provides a function to interface with these lists:
@code{message-add-action}.  The first parameter is the action to be
added, and the rest of the arguments are which lists to add this action
to.  Here's an example from Gnus:

@lisp
  (message-add-action
   `(set-window-configuration ,(current-window-configuration))
   'exit 'postpone 'kill)
@end lisp

This restores the Gnus window configuration when the message buffer is
killed, postponed or exited.

An @dfn{action} can be either: a normal function, or a list where the
@code{car} is a function and the @code{cdr} is the list of arguments, or
a form to be @code{eval}ed.


@node Compatibility
@chapter Compatibility
@cindex compatibility

Message uses virtually only its own variables---older @code{mail-}
variables aren't consulted.  To force Message to take those variables
into account, you can put the following in your @code{.emacs} file:

@lisp
(require 'messcompat)
@end lisp

This will initialize many Message variables from the values in the
corresponding mail variables.


@node Appendices
@chapter Appendices

@menu
* Responses::          Standard rules for determining where responses go.
@end menu


@node Responses
@section Responses

To determine where a message is to go, the following algorithm is used
by default.

@table @dfn
@item reply
A @dfn{reply} is when you want to respond @emph{just} to the person who
sent the message via mail.  There will only be one recipient.  To
determine who the recipient will be, the following headers are
consulted, in turn:

@table @code
@item Reply-To

@item From
@end table


@item wide reply
A @dfn{wide reply} is a mail response that includes @emph{all} entities
mentioned in the message you are responded to.  All mailboxes from the
following headers will be concatenated to form the outgoing
@code{To}/@code{Cc} headers:

@table @code
@item From
(unless there's a @code{Reply-To}, in which case that is used instead).

@item Cc

@item To
@end table

If a @code{Mail-Copies-To} header is present, it will also be included
in the list of mailboxes.  If this header is @samp{never}, that means
that the @code{From} (or @code{Reply-To}) mailbox will be suppressed.


@item followup
A @dfn{followup} is a response sent via news.  The following headers
(listed in order of precedence) determine where the response is to be
sent:

@table @code

@item Followup-To

@item Newsgroups

@end table

If a @code{Mail-Copies-To} header is present, it will be used as the
basis of the new @code{Cc} header, except if this header is
@samp{never}.

@end table



@node Index
@chapter Index
@printindex cp

@node Key Index
@chapter Key Index
@printindex ky

@summarycontents
@contents
@bye

@c End: