setenv allows $-substitution.
[bpt/emacs.git] / man / message.texi
index f5bd43f..96d9e35 100644 (file)
@@ -1,11 +1,11 @@
 \input texinfo                  @c -*-texinfo-*-
 
-@setfilename message
+@setfilename ../info/message
 @settitle Message 5.9.0 Manual
 @synindex fn cp
 @synindex vr cp
 @synindex pg cp
-@dircategory Editors
+@dircategory Emacs
 @direntry
 * Message: (message).   Mail and news composition mode that goes with Gnus.
 @end direntry
 
 This file documents Message, the Emacs message composition mode.
 
-Copyright (C) 1996,97,98,99,2000 Free Software Foundation, Inc.
+Copyright (C) 1996,97,98,99,2000,2001 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
+any later version published by the Free Software Foundation; with no
+Invariant Sections, 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
-License''.
+License'' in the Emacs manual.
 
 (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.''
+
+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.
 @end ifnottex
 
 @tex
@@ -42,7 +47,7 @@ Software Foundation raise funds for GNU development.''
 @page
 
 @vskip 0pt plus 1filll
-Copyright @copyright{} 1996,97,98,99,2000 Free Software Foundation, Inc.
+Copyright @copyright{} 1996,97,98,99,2000,2001 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
@@ -50,11 +55,16 @@ 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
-License''.
+License'' in the Emacs manual.
 
 (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.''
+
+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.
 @end titlepage
 @page
 
@@ -309,6 +319,7 @@ will be removed before popping up the buffer.  The default is
 @chapter Commands
 
 @menu
+* Buffer Entry::        Commands after entering a Message buffer.
 * Header Commands::     Commands for moving to headers.
 * Movement::            Moving around in message buffers.
 * Insertion::           Inserting things into message buffers.
@@ -316,9 +327,25 @@ will be removed before popping up the buffer.  The default is
 * Various Commands::    Various things.
 * Sending::             Actually sending the message.
 * Mail Aliases::        How to use mail aliases.
+* Spelling::            Having Emacs check your spelling.
 @end menu
 
 
+@node Buffer Entry
+@section Buffer Entry
+@cindex undo
+@kindex C-_
+
+You most often end up in a Message buffer when responding to some other
+message of some sort.  Message does lots of handling of quoted text, and
+may remove signatures, reformat the text, or the like---depending on
+which used settings you're using.  Message usually gets things right,
+but sometimes it stumbles.  To help the user unwind these stumblings,
+Message sets the undo boundary before each major automatic action it
+takes.  If you press the undo key (usually located at @kbd{C-_}) a few
+times, you will get back the un-edited message you're responding to.
+
+
 @node Header Commands
 @section Header Commands
 
@@ -342,8 +369,8 @@ Go to the @code{To} header (@code{message-goto-to}).
 @findex message-goto-bcc
 Go to the @code{Bcc} header (@code{message-goto-bcc}).
 
-@item C-c C-f C-f
-@kindex C-c C-f C-f
+@item C-c C-f C-w
+@kindex C-c C-f C-w
 @findex message-goto-fcc
 Go to the @code{Fcc} header (@code{message-goto-fcc}).
 
@@ -372,8 +399,8 @@ Go to the @code{Newsgroups} header (@code{message-goto-newsgroups}).
 @findex message-goto-distribution
 Go to the @code{Distribution} header (@code{message-goto-distribution}).
 
-@item C-c C-f C-o
-@kindex C-c C-f C-o
+@item C-c C-f C-f
+@kindex C-c C-f C-f
 @findex message-goto-followup-to
 Go to the @code{Followup-To} header (@code{message-goto-followup-to}).
 
@@ -419,8 +446,8 @@ Move to the signature of the message (@code{message-goto-signature}).
 Yank the message that's being replied to into the message buffer
 (@code{message-yank-original}).
 
-@item C-c M-C-y
-@kindex C-c M-C-y
+@item C-c C-M-y
+@kindex C-c C-M-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}).
@@ -510,8 +537,9 @@ 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}.
+If non-@code{nil} the name of a file containing the signature to be
+inserted at the end of the buffer.  This is ignored if the file
+doesn't exist.  The default is @samp{~/.signature}.
 
 @end table
 
@@ -683,6 +711,51 @@ No expansion will be performed upon sending of the message---all
 expansions have to be done explicitly.
 
 
+@node Spelling
+@section Spelling
+@cindex spelling
+@findex ispell-message
+
+There are two popular ways to have Emacs spell-check your messages:
+@code{ispell} and @code{flyspell}.  @code{ispell} is the older and
+probably more popular package.  You typically first write the message,
+and then run the entire thing through @code{ispell} and fix all the
+typos.  To have this happen automatically when you send a message, put
+something like the following in your @file{.emacs} file:
+
+@lisp
+(add-hook 'message-send-hook 'ispell-message)
+@end lisp
+
+@vindex ispell-message-dictionary-alist
+If you're in the habit of writing in different languages, this can be
+controlled by the @code{ispell-message-dictionary-alist} variable:
+
+@lisp
+(setq ispell-message-dictionary-alist
+      '(("^Newsgroups:.*\\bde\\." . "deutsch8")
+       (".*" . "default")))
+@end lisp
+
+@code{ispell} depends on having the external @samp{ispell} command
+installed.
+
+The other popular method is using @code{flyspell}.  This package checks
+your spelling while you're writing, and marks any mis-spelled words in
+various ways.
+
+To use @code{flyspell}, put something like the following in your
+@file{.emacs} file:
+
+@lisp
+(defun my-message-setup-routine ()
+  (flyspell-mode 1))
+(add-hook 'message-setup-hook 'my-message-setup-routine)
+@end lisp
+
+@code{flyspell} depends on having the external @samp{ispell} command
+installed.
+
 
 @node Variables
 @chapter Variables
@@ -713,8 +786,11 @@ look sufficiently similar.
 
 @item message-generate-headers-first
 @vindex message-generate-headers-first
-If non-@code{nil}, generate all headers before starting to compose the
-message.
+If non-@code{nil}, generate all required headers before starting to
+compose the message.
+
+The variables @code{message-required-mail-headers} and
+@code{message-required-news-headers} specify which headers are required.
 
 @item message-from-style
 @vindex message-from-style
@@ -758,7 +834,7 @@ 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
+is @emph{not} an abbreviation of the English word ``response'', but is
 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: }
@@ -767,6 +843,11 @@ 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.
 
+@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.
+
 @end table
 
 
@@ -778,12 +859,12 @@ just throw away non-compliant mail.
 @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.
+(optional . User-Agent))} 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:}.
+@samp{^[GF]cc:\|^Resent-Fcc:\|^Xref:}.
 
 @item message-default-mail-headers
 @vindex message-default-mail-headers
@@ -811,6 +892,13 @@ 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.
 
+@item message-send-mail-partially-limit
+@vindex message-send-mail-partially-limit
+The limit on the size of messages sent as @samp{message/partial}.
+This is the minimum message size in characters beyond which the
+message should be sent in several parts.  If it is @code{nil}, the
+size is unlimited.
+
 @end table
 
 
@@ -866,16 +954,11 @@ 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.
 
-@item X-Newsreader
-@cindex X-Newsreader
+@item User-Agent
+@cindex User-Agent
 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.
@@ -1088,9 +1171,8 @@ If you want to add certain headers before sending, you can use the
 @lisp
 (add-hook 'message-send-hook 'my-message-add-content)
 (defun my-message-add-content ()
-  (message-add-header
-   "X-In-No-Sense: Nonsense"
-   "X-Whatever: no"))
+  (message-add-header "X-In-No-Sense: Nonsense")
+  (message-add-header "X-Whatever: no"))
 @end lisp
 
 This function won't add the header if the header is already present.
@@ -1153,7 +1235,7 @@ A function to be called if @var{predicate} returns non-@code{nil}.
 @vindex message-fcc-handler-function
 A function called to save outgoing articles.  This function will be
 called with the name of the file to store the article in.  The default
-function is @code{message-output} which saves in Unix mailbox format.
+function is @code{message-output} which saves in inbox format.
 
 @item message-courtesy-message
 @vindex message-courtesy-message