*** empty log message ***
[gnus] / texi / message.texi
index 6b51f63..2445386 100644 (file)
@@ -1,7 +1,7 @@
 \input texinfo                  @c -*-texinfo-*-
 
-@setfilename message.info
-@settitle Message Manual
+@setfilename message
+@settitle Message 0.15 Manual
 @synindex fn cp
 @synindex vr cp
 @synindex pg cp
@@ -12,7 +12,7 @@
 
 @ifinfo
 
-This file documents Messa, the Emacs message composition mode.
+This file documents Message, the Emacs message composition mode.
 
 Copyright (C) 1996 Free Software Foundation, Inc.
 
@@ -39,7 +39,7 @@ into another language, under the above conditions for modified versions.
 @tex
 
 @titlepage
-@title Message Manual
+@title Message 0.15 Manual
 
 @author by Lars Magne Ingebrigtsen
 @page
@@ -74,10 +74,15 @@ buffers.
 * Interface::         Setting up message buffers.
 * Commands::          Commands you can execute in message mode buffers.
 * Variables::         Customizing the message buffers.
+* Compatibility::     Making Message backwards compatible.
 * Index::             Variable, function and concept index.
 * Key Index::         List of Message mode keys.
 @end menu
 
+This manual corresponds to Message 0.15.  Message is distributed with
+the Gnus distribution bearing the same version number as this manual
+has. 
+
 
 @node Interface
 @chapter Interface
@@ -169,7 +174,9 @@ the head of the outgoing mail.
 
 @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.
+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,
@@ -177,6 +184,10 @@ 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
 @code{message-reply-to-function} (@pxref{Reply}). 
 
+@findex rmail-dont-reply-to-names
+Addresses that match the @code{rmail-dont-reply-to-names} regular
+expression will be removed from the @code{Cc} header.
+
 
 @node Followup
 @section Followup
@@ -216,8 +227,9 @@ 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:}.
+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:}.
 
 
 
@@ -232,13 +244,13 @@ news.
 @table @code
 @item message-forward-start-separator
 @vindex message-forward-start-separator
-Delimiter inserted before forwarded messages.  The default is
+Delimiter inserted before forwarded messages.  The default is@*
 @samp{------- Start of forwarded message -------\n}. 
 
 @vindex message-forward-end-separator
 @item message-forward-end-separator
 @vindex message-forward-end-separator
-Delimiter inserted after forwarded messages.  The default is
+Delimiter inserted after forwarded messages.  The default is@*
 @samp{------- End of forwarded message -------\n}. 
 
 @item message-signature-before-forwarded-message
@@ -247,8 +259,8 @@ If this variable is @code{t}, which it is by default, your personal
 signature will be inserted before the forwarded message.  If not, the
 forwarded message will be inserted first in the new mail.
 
-@item message-forward-included-headers
-@vindex message-forward-included-headers
+@item message-included-forward-headers
+@vindex message-included-forward-headers
 Regexp matching header lines to be included in forwarded messages.  
 
 @end table
@@ -262,7 +274,7 @@ 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 the match the @code{message-ignored-resent-headers} regexp will
+Headers that match the @code{message-ignored-resent-headers} regexp will
 be removed before sending the message.  The default is
 @samp{^Return-receipt}. 
 
@@ -273,12 +285,14 @@ be removed before sending the message.  The default is
 @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.
+information.  A @dfn{bounced message} is typically a mail you've sent
+out that has been returned by some @code{mailer-daemon} as
+undeliverable. 
 
 @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:}. 
+@samp{^\\(Received\\|Return-Path\\):}.
 
 
 @node Commands
@@ -290,6 +304,7 @@ will be removed before popping up the buffer.  The default is
 * Insertion::           Inserting things into message buffers.
 * Various Commands::    Various things.
 * Sending::             Actually sending the message.
+* Mail Aliases::        How to use mail aliases.
 @end menu
 
 
@@ -436,10 +451,10 @@ Number of spaces to indent yanked messages.
 @vindex message-cite-function
 @findex message-cite-original
 @findex sc-cite-original
-@cindex SuperCite
+@cindex Supercite
 Function for citing an original message.  The default is
 @code{message-cite-original}.  You can also set it to
-@code{sc-cite-original} to use SuperCite.
+@code{sc-cite-original} to use Supercite.
 
 @item message-indent-citation-function
 @vindex message-indent-citation-function
@@ -463,11 +478,11 @@ The default is @samp{~/.signature}.
 
 @end table
 
-Note that RFC1036 says that a signature should be preceded by the three
+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 you beautiful design, like, totally.
+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
@@ -488,6 +503,42 @@ Caesar rotate (aka. rot13) the current message
 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}).
+The text is killed and an ellipsis (@samp{[...]}) will be inserted in
+its place.
+
+@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
+
+@samp{*} says where point will be placed.  
+
 @item C-c C-t
 @kindex C-c C-t 
 @findex message-insert-to
@@ -539,6 +590,35 @@ 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
 
@@ -550,6 +630,7 @@ Kill the message buffer and exit (@code{message-kill-buffer}).
 * 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
 
@@ -557,7 +638,7 @@ Kill the message buffer and exit (@code{message-kill-buffer}).
 @node Message Headers
 @section Message Headers
 
-Message is quite aggressive on the message generation front.  It has
+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 to ensure that
 mail and news copies of messages look sufficiently similar.
@@ -617,14 +698,14 @@ buffers.
 @table @code
 @item message-required-mail-headers
 @vindex message-required-mail-headers
-See @pxref{News Headers} for the syntax of this variable.  It is
+@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{^Gcc:\\|^Fcc:}. 
+@samp{^[GF]cc:\\|^Resent-Fcc:}.
 
 @item message-default-mail-headers
 @vindex message-default-mail-headers
@@ -644,6 +725,13 @@ 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.  Set it to
+@code{nil} if your MH can handle these headers.
+
 @end table
 
 
@@ -659,6 +747,8 @@ impossible, they will be prompted for.  The following symbols are legal:
 
 @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},
@@ -677,8 +767,10 @@ to.  If it isn't present already, it will be prompted for.
 @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 that variable is
-@code{t}.
+@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
@@ -686,8 +778,15 @@ 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
-created based on date, time, user name and system name.
+created based on the date, time, user name and system name.  Message will
+use @code{mail-host-address} as the fully qualified domain name (FQDN)
+of the machine if that variable is defined.  If not, it will use
+@code{system-name}, which doesn't report a FQDN on some machines --
+notably Suns.
 
 @item X-Newsreader
 @cindex X-Newsreader
@@ -701,7 +800,7 @@ This optional header will be filled out according to the
 
 @item In-Reply-To
 This optional header is filled out using the @code{Date} and @code{From}
-header of the article being replied.
+header of the article being replied to.
 
 @item Expires
 @cindex Expires
@@ -717,11 +816,11 @@ much misunderstood header.
 
 @item Path
 @cindex path
-This extremely optional header should probably not ever be used.
+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 is is @code{nil}, the the server name
-as the leaf node.  If is is a string, use the string.  If it is neither
+@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
@@ -748,7 +847,7 @@ Other variables for customizing outgoing news articles:
 
 @item message-syntax-checks
 @vindex message-syntax-checks
-If non-@code{nil}, message will attempt to check the legality of the
+If non-@code{nil}, Message will attempt to check the legality of the
 headers, as well as some other stuff, before posting.  You can control
 the granularity of the check by adding or removing elements from this
 list.  Legal elements are:
@@ -788,19 +887,25 @@ Check whether the article is empty.
 @item empty-headers
 Check whether any of the headers are empty.
 @item existing-newsgroups
-Check whether the newsgroups mentioned in the Newsgroups and 
-Followup-To headers exist.
+Check whether the newsgroups mentioned in the @code{Newsgroups} and 
+@code{Followup-To} headers exist.
 @item valid-newsgroups
-Check whether the @code{Newsgroups} and @code{Followup-To} headers
-are valid syntactially.
+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:\\|^Bcc:\\|^Gcc:\\|^Fcc:}. 
+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
@@ -848,18 +953,63 @@ Directory used by many mailey things.  The default is @file{~/Mail/}.
 @vindex message-autosave-directory
 Directory where message buffers will be autosaved to.
 
+@item message-signature-setup-hook
+@vindex message-signature-setup-hook
+Hook run when initializing the message buffer.  It is run after the
+headers have been inserted but before the signature has been inserted. 
+
 @item message-setup-hook
 @vindex message-setup-hook
-Hook run when the message buffer has been initialized.
+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
 Hook called narrowed to the headers after initializing the headers. 
 
+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
+   "Mime-Version: 1.0"
+   "Content-Type: text/plain"
+   "Content-Transfer-Encoding: 7bit"))
+@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.
@@ -868,6 +1018,35 @@ Hook run after sending messages.
 @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
 
 
@@ -881,13 +1060,58 @@ Syntax table used in message mode buffers.
 @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{rmail-output} which saves in Unix mailbox format.
+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 this variable is @code{nil}, no such courtesy
-message will be added.
+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
+an article\nthat has been posted to %s as well.\n\n"}. 
+
+@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
 
@@ -927,10 +1151,28 @@ to.  Here's an example from Gnus:
 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
+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 Index
 @chapter Index
 @printindex cp