diff options
| author | Chong Yidong | 2010-03-27 23:41:34 -0400 |
|---|---|---|
| committer | Chong Yidong | 2010-03-27 23:41:34 -0400 |
| commit | e73c243459162509dcfc5f74ff9811fe024c93f9 (patch) | |
| tree | 875e8748d3a9b14470cf7fa8c7cb6e37000763ac /doc | |
| parent | 481134fd24fa0c452667483be3ce8a31f9cf572b (diff) | |
| download | emacs-e73c243459162509dcfc5f74ff9811fe024c93f9.tar.gz emacs-e73c243459162509dcfc5f74ff9811fe024c93f9.zip | |
Document Message mode as the default mail mode.
* sending.texi (Sending Mail): Document the fact that Message mode is
now the default mail mode.
(Mail Format, Mail Headers): Document mail-from-style changes.
(Mail Commands): Rename from Mail mode. Document Message mode.
(Mail Misc): Rename from Mail mode Misc.
(Mail Sending, Header Editing, Mail Misc): Switch to Message mode
command names and update keybindings.
(Header Editing): Document message-tab. De-document
mail-self-blind, mail-default-reply-to, and mail-archive-file-name in
favor of mail-default-headers. Ad index entries for user-full-name and
user-mail-address.
(Citing Mail): Update changes in Message mode behavior. Document
mail-yank-prefix.
(Mail Signature): New node, moved from Mail Misc.
(Mail Aliases): Mail abbrevs are the default with Message mode.
(Mail Methods): Note that Message mode is now the default.
* rmail.texi (Rmail Reply):
* text.texi (Text Mode):
* major.texi (Major Modes):
* mule.texi (Output Coding): Refer to Message mode.
* custom.texi (Init Examples): Add xref to Mail Header.
* emacs.texi (Top): Fix xrefs.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/emacs/ChangeLog | 29 | ||||
| -rw-r--r-- | doc/emacs/custom.texi | 5 | ||||
| -rw-r--r-- | doc/emacs/emacs.texi | 9 | ||||
| -rw-r--r-- | doc/emacs/major.texi | 2 | ||||
| -rw-r--r-- | doc/emacs/mule.texi | 19 | ||||
| -rw-r--r-- | doc/emacs/rmail.texi | 24 | ||||
| -rw-r--r-- | doc/emacs/sending.texi | 972 | ||||
| -rw-r--r-- | doc/emacs/text.texi | 8 |
8 files changed, 492 insertions, 576 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index ca70c699b72..056c970b0f3 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,32 @@ | |||
| 1 | 2010-03-28 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | Document Message mode as the default mail mode. | ||
| 4 | |||
| 5 | * sending.texi (Sending Mail): Copyedits. | ||
| 6 | (Mail Format, Mail Headers): Document mail-from-style changes. | ||
| 7 | (Mail Commands): Rename from Mail mode. Document Message mode. | ||
| 8 | (Mail Misc): Rename from Mail mode Misc. | ||
| 9 | (Mail Sending, Header Editing, Mail Misc): Switch to Message mode | ||
| 10 | command names and update keybindings. | ||
| 11 | (Header Editing): Document message-tab. De-document | ||
| 12 | mail-self-blind, mail-default-reply-to, and mail-archive-file-name in | ||
| 13 | favor of mail-default-headers. Ad index entries for user-full-name and | ||
| 14 | user-mail-address. | ||
| 15 | (Citing Mail): Update changes in Message mode behavior. Document | ||
| 16 | mail-yank-prefix. | ||
| 17 | (Mail Signature): New node, moved from Mail Misc. | ||
| 18 | (Mail Aliases): Mail abbrevs are the default with Message mode. | ||
| 19 | (Mail Methods): Note that Message mode is now the default. | ||
| 20 | |||
| 21 | * rmail.texi (Rmail Reply): | ||
| 22 | * text.texi (Text Mode): | ||
| 23 | * major.texi (Major Modes): | ||
| 24 | * mule.texi (Output Coding): Refer to Message mode. | ||
| 25 | |||
| 26 | * custom.texi (Init Examples): Add xref to Mail Header. | ||
| 27 | |||
| 28 | * emacs.texi (Top): Fix xrefs. | ||
| 29 | |||
| 1 | 2010-03-25 Chong Yidong <cyd@stupidchicken.com> | 30 | 2010-03-25 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 31 | ||
| 3 | * maintaining.texi (VC With A Merging VCS): C-x v v now creates a | 32 | * maintaining.texi (VC With A Merging VCS): C-x v v now creates a |
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index 408de24ed6e..f0faec4d40c 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi | |||
| @@ -2269,8 +2269,9 @@ Specify your own email address, if Emacs can't figure it out correctly. | |||
| 2269 | (setq user-mail-address "cheney@@torture.gov") | 2269 | (setq user-mail-address "cheney@@torture.gov") |
| 2270 | @end example | 2270 | @end example |
| 2271 | 2271 | ||
| 2272 | Various Emacs packages that need your own email address use the value of | 2272 | Various Emacs packages, such as Message mode, consult |
| 2273 | @code{user-mail-address}. | 2273 | @code{user-mail-address} when they need to know your email address. |
| 2274 | @xref{Mail Headers}. | ||
| 2274 | 2275 | ||
| 2275 | @item | 2276 | @item |
| 2276 | Make Text mode the default mode for new buffers. | 2277 | Make Text mode the default mode for new buffers. |
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index 450c5e3a684..e480f45ec4e 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi | |||
| @@ -886,16 +886,17 @@ Sending Mail | |||
| 886 | * Mail Format:: Format of the mail being composed. | 886 | * Mail Format:: Format of the mail being composed. |
| 887 | * Mail Headers:: Details of some standard mail header fields. | 887 | * Mail Headers:: Details of some standard mail header fields. |
| 888 | * Mail Aliases:: Abbreviating and grouping mail addresses. | 888 | * Mail Aliases:: Abbreviating and grouping mail addresses. |
| 889 | * Mail Mode:: Special commands for editing mail being composed. | 889 | * Mail Commands:: Special commands for editing mail being composed. |
| 890 | * Mail Signature:: Adding a signature to every message. | ||
| 890 | * Mail Amusements:: Distracting the NSA; adding fortune messages. | 891 | * Mail Amusements:: Distracting the NSA; adding fortune messages. |
| 891 | * Mail Methods:: Using alternative mail-composition methods. | 892 | * Mail Methods:: Using alternative mail-composition methods. |
| 892 | 893 | ||
| 893 | Mail Mode | 894 | Mail Commands |
| 894 | 895 | ||
| 895 | * Mail Sending:: Commands to send the message. | 896 | * Mail Sending:: Commands to send the message. |
| 896 | * Header Editing:: Commands to move to header fields and edit them. | 897 | * Header Editing:: Commands to move to header fields and edit them. |
| 897 | * Citing Mail:: Copying all or part of a message you are replying to. | 898 | * Citing Mail:: Quoting a message you are replying to. |
| 898 | * Mail Mode Misc:: Spell checking, signatures, etc. | 899 | * Mail Misc:: Attachments, spell checking, etc. |
| 899 | 900 | ||
| 900 | Reading Mail with Rmail | 901 | Reading Mail with Rmail |
| 901 | 902 | ||
diff --git a/doc/emacs/major.texi b/doc/emacs/major.texi index 19ab86f91dd..d67bc4a13dd 100644 --- a/doc/emacs/major.texi +++ b/doc/emacs/major.texi | |||
| @@ -41,7 +41,7 @@ languages. These include Lisp mode (which has several variants), C | |||
| 41 | mode, Fortran mode, and others. The remaining major modes are not | 41 | mode, Fortran mode, and others. The remaining major modes are not |
| 42 | intended for use on users' files; they are used in buffers created for | 42 | intended for use on users' files; they are used in buffers created for |
| 43 | specific purposes by Emacs, such as Dired mode for buffers made by | 43 | specific purposes by Emacs, such as Dired mode for buffers made by |
| 44 | Dired (@pxref{Dired}), Mail mode for buffers made by @kbd{C-x m} | 44 | Dired (@pxref{Dired}), Message mode for buffers made by @kbd{C-x m} |
| 45 | (@pxref{Sending Mail}), and Shell mode for buffers used for | 45 | (@pxref{Sending Mail}), and Shell mode for buffers used for |
| 46 | communicating with an inferior shell process (@pxref{Interactive | 46 | communicating with an inferior shell process (@pxref{Interactive |
| 47 | Shell}). | 47 | Shell}). |
diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi index 00aa9047aec..c00511b4dce 100644 --- a/doc/emacs/mule.texi +++ b/doc/emacs/mule.texi | |||
| @@ -961,15 +961,16 @@ still use an unsuitable coding system if you type its name in response | |||
| 961 | to the question.) | 961 | to the question.) |
| 962 | 962 | ||
| 963 | @vindex sendmail-coding-system | 963 | @vindex sendmail-coding-system |
| 964 | When you send a message with Mail mode (@pxref{Sending Mail}), Emacs has | 964 | When you send a message with Message mode (@pxref{Sending Mail}), |
| 965 | four different ways to determine the coding system to use for encoding | 965 | Emacs has four different ways to determine the coding system to use |
| 966 | the message text. It tries the buffer's own value of | 966 | for encoding the message text. It tries the buffer's own value of |
| 967 | @code{buffer-file-coding-system}, if that is non-@code{nil}. Otherwise, | 967 | @code{buffer-file-coding-system}, if that is non-@code{nil}. |
| 968 | it uses the value of @code{sendmail-coding-system}, if that is | 968 | Otherwise, it uses the value of @code{sendmail-coding-system}, if that |
| 969 | non-@code{nil}. The third way is to use the default coding system for | 969 | is non-@code{nil}. The third way is to use the default coding system |
| 970 | new files, which is controlled by your choice of language environment, | 970 | for new files, which is controlled by your choice of language |
| 971 | if that is non-@code{nil}. If all of these three values are @code{nil}, | 971 | environment, if that is non-@code{nil}. If all of these three values |
| 972 | Emacs encodes outgoing mail using the Latin-1 coding system. | 972 | are @code{nil}, Emacs encodes outgoing mail using the Latin-1 coding |
| 973 | system. | ||
| 973 | 974 | ||
| 974 | @node Text Coding | 975 | @node Text Coding |
| 975 | @section Specifying a Coding System for File Text | 976 | @section Specifying a Coding System for File Text |
diff --git a/doc/emacs/rmail.texi b/doc/emacs/rmail.texi index d5ea368dd3b..8a4ce492ee1 100644 --- a/doc/emacs/rmail.texi +++ b/doc/emacs/rmail.texi | |||
| @@ -683,12 +683,12 @@ standard meaning. | |||
| 683 | @node Rmail Reply | 683 | @node Rmail Reply |
| 684 | @section Sending Replies | 684 | @section Sending Replies |
| 685 | 685 | ||
| 686 | Rmail has several commands that use Mail mode to send outgoing mail. | 686 | Rmail has several commands to send outgoing mail. @xref{Sending |
| 687 | @xref{Sending Mail}, for information on using Mail mode, including | 687 | Mail}, for information on using Message mode, including certain |
| 688 | certain features meant to work with Rmail. What this section documents | 688 | features meant to work with Rmail. What this section documents are |
| 689 | are the special commands of Rmail for entering Mail mode. Note that the | 689 | the special commands of Rmail for entering the mail buffer. Note that |
| 690 | usual keys for sending mail---@kbd{C-x m}, @kbd{C-x 4 m}, and @kbd{C-x 5 | 690 | the usual keys for sending mail---@kbd{C-x m}, @kbd{C-x 4 m}, and |
| 691 | m}---also work normally in Rmail mode. | 691 | @kbd{C-x 5 m}---also work normally in Rmail mode. |
| 692 | 692 | ||
| 693 | @table @kbd | 693 | @table @kbd |
| 694 | @item m | 694 | @item m |
| @@ -735,12 +735,12 @@ the reply command with a numeric argument: @kbd{C-u r} or @kbd{1 r}. | |||
| 735 | This means to reply only to the sender of the original message. | 735 | This means to reply only to the sender of the original message. |
| 736 | 736 | ||
| 737 | Once the @samp{*mail*} buffer has been initialized, editing and | 737 | Once the @samp{*mail*} buffer has been initialized, editing and |
| 738 | sending the mail goes as usual (@pxref{Sending Mail}). You can edit the | 738 | sending the mail goes as usual (@pxref{Sending Mail}). You can edit |
| 739 | presupplied header fields if they are not what you want. You can also | 739 | the presupplied header fields if they are not what you want. You can |
| 740 | use the commands of Mail mode (@pxref{Mail Mode}), including @kbd{C-c | 740 | also use commands such as @kbd{C-c C-y}, which yanks in the message |
| 741 | C-y} which yanks in the message that you are replying to. You can | 741 | that you are replying to (@pxref{Mail Commands}). You can also switch |
| 742 | also switch to the Rmail buffer, select a different message there, switch | 742 | to the Rmail buffer, select a different message there, switch back, |
| 743 | back, and yank the new current message. | 743 | and yank the new current message. |
| 744 | 744 | ||
| 745 | @kindex M-m @r{(Rmail)} | 745 | @kindex M-m @r{(Rmail)} |
| 746 | @findex rmail-retry-failure | 746 | @findex rmail-retry-failure |
diff --git a/doc/emacs/sending.texi b/doc/emacs/sending.texi index 717c89936fc..3700e5c2e3b 100644 --- a/doc/emacs/sending.texi +++ b/doc/emacs/sending.texi | |||
| @@ -6,120 +6,104 @@ | |||
| 6 | @chapter Sending Mail | 6 | @chapter Sending Mail |
| 7 | @cindex sending mail | 7 | @cindex sending mail |
| 8 | @cindex mail | 8 | @cindex mail |
| 9 | @cindex email | ||
| 9 | @cindex message | 10 | @cindex message |
| 10 | 11 | ||
| 11 | To send a message in Emacs, you start by typing a command (@kbd{C-x m}) | 12 | @kindex C-x m |
| 12 | to select and initialize the @samp{*mail*} buffer. Then you edit the text | 13 | @findex compose-mail |
| 13 | and headers of the message in this buffer, and type another command | 14 | To send an @dfn{e-mail} message in Emacs, type @kbd{C-x m}. This |
| 14 | (@kbd{C-c C-s} or @kbd{C-c C-c}) to send the message. | 15 | selects and initializes a buffer named @samp{*mail*}, where you can |
| 16 | edit the text and headers of the message. Finally, type @kbd{C-c C-s} | ||
| 17 | or @kbd{C-c C-c} to send the message. | ||
| 15 | 18 | ||
| 16 | @table @kbd | 19 | @table @kbd |
| 17 | @item C-x m | 20 | @item C-x m |
| 18 | Begin composing a message to send (@code{compose-mail}). | 21 | Begin composing mail (@code{compose-mail}). |
| 19 | @item C-x 4 m | 22 | @item C-x 4 m |
| 20 | Likewise, but display the message in another window | 23 | Likewise, in another window (@code{compose-mail-other-window}). |
| 21 | (@code{compose-mail-other-window}). | ||
| 22 | @item C-x 5 m | 24 | @item C-x 5 m |
| 23 | Likewise, but make a new frame (@code{compose-mail-other-frame}). | 25 | Likewise, but in a new frame (@code{compose-mail-other-frame}). |
| 24 | @item C-c C-s | 26 | @item C-c C-s |
| 25 | In Mail mode, send the message (@code{mail-send}). | 27 | In the mail buffer, send the message (@code{message-send}). |
| 26 | @item C-c C-c | 28 | @item C-c C-c |
| 27 | Send the message and bury the mail buffer (@code{mail-send-and-exit}). | 29 | In the mail buffer, send the message and bury the buffer |
| 30 | (@code{message-send-and-exit}). | ||
| 28 | @end table | 31 | @end table |
| 29 | 32 | ||
| 30 | @kindex C-x m | ||
| 31 | @findex compose-mail | ||
| 32 | @kindex C-x 4 m | 33 | @kindex C-x 4 m |
| 33 | @findex compose-mail-other-window | 34 | @findex compose-mail-other-window |
| 34 | @kindex C-x 5 m | 35 | @kindex C-x 5 m |
| 35 | @findex compose-mail-other-frame | 36 | @findex compose-mail-other-frame |
| 36 | The command @kbd{C-x m} (@code{compose-mail}) selects a buffer named | 37 | @noindent |
| 37 | @samp{*mail*} and initializes it with the skeleton of an outgoing | 38 | The command @kbd{C-x 4 m} (@code{compose-mail-other-window}) does the |
| 38 | message. @kbd{C-x 4 m} (@code{compose-mail-other-window}) selects the | 39 | same as @kbd{C-x m}, except it displays the mail buffer in a different |
| 39 | @samp{*mail*} buffer in a different window, leaving the previous current | 40 | window. The command @kbd{C-x 5 m} (@code{compose-mail-other-frame}) |
| 40 | buffer visible. @kbd{C-x 5 m} (@code{compose-mail-other-frame}) creates | 41 | creates a new frame for the mail buffer. |
| 41 | a new frame to select the @samp{*mail*} buffer. | 42 | |
| 42 | 43 | Because the mail buffer is an ordinary Emacs buffer, you can switch | |
| 43 | Because the mail-composition buffer is an ordinary Emacs buffer, you can | 44 | to other buffers while in the middle of composing mail, and switch |
| 44 | switch to other buffers while in the middle of composing mail, and switch | 45 | back later (or never). If you type @kbd{C-x m} again when you have |
| 45 | back later (or never). If you use the @kbd{C-x m} command again when you | 46 | been composing another message but have not sent it, Emacs asks for |
| 46 | have been composing another message but have not sent it, you are asked to | 47 | confirmation before erasing the old message. If you answer @kbd{n}, |
| 47 | confirm before the old message is erased. If you answer @kbd{n}, the | 48 | Emacs selects the mail buffer with its old contents, so you can finish |
| 48 | @samp{*mail*} buffer remains selected with its old contents, so you can | 49 | the old message and send it. @kbd{C-u C-x m} is another way to do |
| 49 | finish the old message and send it. @kbd{C-u C-x m} is another way to do | 50 | this. Sending the message marks the mail buffer ``unmodified,'' which |
| 50 | this. Sending the message marks the @samp{*mail*} buffer ``unmodified,'' | 51 | avoids the need for confirmation when @kbd{C-x m} is next used. |
| 51 | which avoids the need for confirmation when @kbd{C-x m} is next used. | 52 | |
| 52 | 53 | If you want to send another message before finishing the current | |
| 53 | If you are composing a message in the @samp{*mail*} buffer and want to | 54 | message, use the command @kbd{M-x rename-uniquely} to rename the |
| 54 | send another message before finishing the first, rename the | 55 | current mail buffer (@pxref{Misc Buffer}). Then you can use @kbd{C-x |
| 55 | @samp{*mail*} buffer using @kbd{M-x rename-uniquely} (@pxref{Misc | 56 | m} to make a new mail buffer, and work with each mail buffer |
| 56 | Buffer}). Then you can use @kbd{C-x m} or its variants described above | 57 | independently. |
| 57 | to make a new @samp{*mail*} buffer. Once you've done that, you can work | ||
| 58 | with each mail buffer independently. | ||
| 59 | |||
| 60 | @vindex mail-default-directory | ||
| 61 | The variable @code{mail-default-directory} controls the default | ||
| 62 | directory for mail buffers, and also says where to put their auto-save | ||
| 63 | files. | ||
| 64 | |||
| 65 | @c Not mentioned: mail-bury-selects-summary. Really an Rmail feature. | ||
| 66 | |||
| 67 | @ignore | ||
| 68 | @c Commented out because it is not user-oriented; | ||
| 69 | @c it doesn't say how to do some job. -- rms. | ||
| 70 | @cindex directory servers | ||
| 71 | @cindex LDAP | ||
| 72 | @cindex PH/QI | ||
| 73 | @cindex names and addresses | ||
| 74 | There is an interface to directory servers using various protocols such | ||
| 75 | as LDAP or the CCSO white pages directory system (PH/QI), described in a | ||
| 76 | separate manual. It may be useful for looking up names and addresses. | ||
| 77 | @xref{Top,,EUDC, eudc, EUDC Manual}. | ||
| 78 | @end ignore | ||
| 79 | 58 | ||
| 80 | @menu | 59 | @menu |
| 81 | * Format: Mail Format. Format of the mail being composed. | 60 | * Format: Mail Format. Format of a mail message. |
| 82 | * Headers: Mail Headers. Details of some standard mail header fields. | 61 | * Headers: Mail Headers. Details of some standard mail header fields. |
| 83 | * Aliases: Mail Aliases. Abbreviating and grouping mail addresses. | 62 | * Aliases: Mail Aliases. Abbreviating and grouping mail addresses. |
| 84 | * Mode: Mail Mode. Special commands for editing mail being composed. | 63 | * Commands: Mail Commands. Special commands for editing mail being composed. |
| 85 | * Amuse: Mail Amusements. Distracting the NSA; adding fortune messages. | 64 | * Signature: Mail Signature. Adding a signature to every message. |
| 86 | * Methods: Mail Methods. Using alternative mail-composition methods. | 65 | * Amuse: Mail Amusements. Distracting the NSA; adding fortune messages. |
| 66 | * Methods: Mail Methods. Using alternative mail-composition methods. | ||
| 87 | @end menu | 67 | @end menu |
| 88 | 68 | ||
| 89 | @node Mail Format | 69 | @node Mail Format |
| 90 | @section The Format of the Mail Buffer | 70 | @section The Format of the Mail Buffer |
| 91 | 71 | ||
| 92 | In addition to the @dfn{text} or @dfn{body}, a message has @dfn{header | 72 | An email message must contain certain pieces of information, called |
| 93 | fields} which say who sent it, when, to whom, why, and so on. Some | 73 | @dfn{headers}, which specify the message's sender, recipient(s), and |
| 94 | header fields, such as @samp{Date} and @samp{Message-Id}, are created | 74 | so on. |
| 95 | automatically when you send the message. Others, such as the recipient | ||
| 96 | names, must be specified by you in order to send the message properly. | ||
| 97 | 75 | ||
| 98 | In the mail buffer, you can insert and edit header fields using | 76 | At the top of the mail buffer is a set of @dfn{header fields}, where |
| 99 | ordinary editing commands. Mail mode provides commands to help you | 77 | you can enter this information. You can insert and edit header fields |
| 100 | edit some header fields, and some are automatically preinitialized in | 78 | using ordinary editing commands. @xref{Header Editing}, for commands |
| 101 | the buffer, when appropriate. | 79 | specific to editing header fields. |
| 80 | |||
| 81 | Some header fields are automatically pre-initialized in the buffer, | ||
| 82 | when appropriate; other headers, such as @samp{Date} and | ||
| 83 | @samp{Message-Id}, are normally omitted from the mail buffer and | ||
| 84 | created automatically when the message is sent. | ||
| 102 | 85 | ||
| 103 | @vindex mail-header-separator | 86 | @vindex mail-header-separator |
| 104 | The line in the buffer that says | 87 | The line in the buffer that says |
| 105 | 88 | ||
| 106 | @example | 89 | @smallexample |
| 107 | --text follows this line-- | 90 | --text follows this line-- |
| 108 | @end example | 91 | @end smallexample |
| 109 | 92 | ||
| 110 | @noindent | 93 | @noindent |
| 111 | is a special delimiter that separates the headers you have specified from | 94 | separates the header fields from the @dfn{body} (or @dfn{text}) of the |
| 112 | the text. Whatever follows this line is the text of the message; the | 95 | message. Everything above this line is treated as part of the |
| 113 | headers precede it. The delimiter line itself does not appear in the | 96 | headers; everything below it is treated as the body. The delimiter |
| 114 | message actually sent. The text used for the delimiter line is controlled | 97 | line itself does not appear in the message actually sent. The text |
| 115 | by the variable @code{mail-header-separator}. | 98 | used for the delimiter line is controlled by the variable |
| 99 | @code{mail-header-separator}. | ||
| 116 | 100 | ||
| 117 | Here is an example of what the headers and text in the mail buffer | 101 | Here is an example of what the headers and text in the mail buffer |
| 118 | might look like. | 102 | might look like. |
| 119 | 103 | ||
| 120 | @example | 104 | @example |
| 121 | To: gnu@@gnu.org | 105 | To: gnu@@example.org |
| 122 | CC: lungfish@@spam.org, byob@@spam.org | 106 | CC: lungfish@@example.com, byob@@example.net |
| 123 | Subject: The Emacs Manual | 107 | Subject: The Emacs Manual |
| 124 | --text follows this line-- | 108 | --text follows this line-- |
| 125 | Please ignore this message. | 109 | Please ignore this message. |
| @@ -134,85 +118,51 @@ beginning of a line, terminated by a colon. Upper and lower case are | |||
| 134 | equivalent in field names (and in mailing addresses also). After the | 118 | equivalent in field names (and in mailing addresses also). After the |
| 135 | colon and optional whitespace comes the contents of the field. | 119 | colon and optional whitespace comes the contents of the field. |
| 136 | 120 | ||
| 137 | You can use any name you like for a header field, but normally people | 121 | You can use any name you like for a header field, but normally |
| 138 | use only standard field names with accepted meanings. Here is a table | 122 | people use only standard field names with accepted meanings. Here is |
| 139 | of fields commonly used in outgoing messages. Emacs preinitializes some | 123 | a table of commonly-used fields. Emacs pre-initializes some of these, |
| 140 | of these when you start to compose a mail, depending on various options | 124 | depending on various options you can set. You can delete or alter any |
| 141 | you can set. You can delete or alter any header field before you send | 125 | header field before you send the message, if you wish. |
| 142 | the message, if you wish. | ||
| 143 | 126 | ||
| 144 | @table @samp | 127 | @table @samp |
| 128 | @item From | ||
| 129 | @vindex user-mail-address | ||
| 130 | The address of the sender (you). This should be a valid mailing | ||
| 131 | address, as replies will normally go there. Emacs initializes this | ||
| 132 | field using the variables @code{user-full-name} and | ||
| 133 | @code{user-mail-address}; see below. | ||
| 134 | |||
| 145 | @item To | 135 | @item To |
| 146 | This field contains the mailing addresses to which the message is | 136 | The mailing address(es) to which the message is addressed. To list |
| 147 | addressed. If you list more than one address, use commas, not spaces, | 137 | more than one address, use commas (not spaces) to separate them. |
| 148 | to separate them. | ||
| 149 | 138 | ||
| 150 | @item Subject | 139 | @item Subject |
| 151 | The contents of the @samp{Subject} field should be a piece of text | 140 | A piece of text saying what the message is about. Most mail-reading |
| 152 | that says what the message is about. The reason @samp{Subject} fields | 141 | programs can display a summary of messages, listing the subject of |
| 153 | are useful is that most mail-reading programs can provide a summary of | 142 | each message but not its text. |
| 154 | messages, listing the subject of each message but not its text. | ||
| 155 | 143 | ||
| 156 | @item CC | 144 | @item CC |
| 157 | This field contains additional mailing addresses to send the message to, | 145 | Additional mailing address(es) to send the message to. This is like |
| 158 | like @samp{To} except that these readers should not regard the message | 146 | @samp{To}, except that these readers should not regard the message as |
| 159 | as directed at them. | 147 | directed at them. |
| 160 | 148 | ||
| 161 | @item BCC | 149 | @item BCC |
| 162 | This field contains additional mailing addresses to send the message to, | 150 | Additional mailing address(es) to send the message to, which should |
| 163 | which should not appear in the header of the message actually sent. | 151 | not appear in the header of the message actually sent. ``BCC'' stands |
| 164 | Copies sent this way are called @dfn{blind carbon copies}. | 152 | for @dfn{blind carbon copies}. |
| 165 | |||
| 166 | @vindex mail-self-blind | ||
| 167 | @cindex copy of every outgoing message | ||
| 168 | To send a blind carbon copy of every outgoing message to yourself, set | ||
| 169 | the variable @code{mail-self-blind} to @code{t}. To send a blind carbon | ||
| 170 | copy of every message to some other @var{address}, set the variable | ||
| 171 | @code{mail-default-headers} to @code{"Bcc: @var{address}\n"}. | ||
| 172 | 153 | ||
| 173 | @item FCC | 154 | @item FCC |
| 174 | This field contains the name of one file and directs Emacs to append a | 155 | The name of one file, to which a copy of the sent message should be |
| 175 | copy of the message to that file when you send the message. Emacs | 156 | appended. Emacs writes the message in mbox format, unless the file is |
| 176 | writes the message in mbox format, unless the file is in Babyl format | 157 | in Babyl format (used by Rmail before Emacs 23), in which case Emacs |
| 177 | (used by Rmail before Emacs 23), in which case Emacs writes Babyl. If | 158 | writes Babyl. If an Rmail buffer is visiting the file, Emacs updates |
| 178 | an Rmail buffer is visiting the file, Emacs updates it accordingly. | 159 | it accordingly. To specify more than one file, use several @samp{FCC} |
| 179 | To specify more than one file, use several @samp{FCC} fields, with one | 160 | fields, with one file name in each field. |
| 180 | file name in each field. | ||
| 181 | |||
| 182 | @vindex mail-archive-file-name | ||
| 183 | To put a fixed file name in the @samp{FCC} field each time you start | ||
| 184 | editing an outgoing message, set the variable | ||
| 185 | @code{mail-archive-file-name} to that file name. Unless you remove the | ||
| 186 | @samp{FCC} field before sending, the message will be written into that | ||
| 187 | file when it is sent. | ||
| 188 | |||
| 189 | @item From | ||
| 190 | Use the @samp{From} field to say who you are. You might need to change | ||
| 191 | this if the account you are using to send the mail is not your own. The | ||
| 192 | contents of the @samp{From} field should be a valid mailing address, | ||
| 193 | since replies will normally go there. | ||
| 194 | |||
| 195 | @vindex mail-setup-with-from | ||
| 196 | Emacs initializes this field (unless the variable | ||
| 197 | @code{mail-setup-with-from} is @code{nil}) using | ||
| 198 | @code{user-mail-address} as the default. If there is no @samp{From} | ||
| 199 | field when you send a mail, Emacs adds one. | ||
| 200 | 161 | ||
| 201 | @item Reply-to | 162 | @item Reply-to |
| 202 | Use this field to direct replies to a different address. Most | 163 | An address to which replies should be sent, instead of @samp{From}. |
| 203 | mail-reading programs (including Rmail) automatically send replies to | 164 | You can use this header if, for some reason, your @samp{From} address |
| 204 | the @samp{Reply-to} address in preference to the @samp{From} address. | 165 | is unable to receive replies. |
| 205 | By adding a @samp{Reply-to} field to your header, you can work around | ||
| 206 | any problems your @samp{From} address may cause for replies. | ||
| 207 | |||
| 208 | @cindex @env{REPLYTO} environment variable | ||
| 209 | @vindex mail-default-reply-to | ||
| 210 | To put a fixed @samp{Reply-to} address into every outgoing message, set | ||
| 211 | the variable @code{mail-default-reply-to} to that address (as a string). | ||
| 212 | Then Emacs initializes the message with a @samp{Reply-to} field as | ||
| 213 | specified. When you first compose a mail, if | ||
| 214 | @code{mail-default-reply-to} is @code{nil}, Emacs initializes it from the | ||
| 215 | environment variable @env{REPLYTO}. | ||
| 216 | 166 | ||
| 217 | @item Mail-reply-to | 167 | @item Mail-reply-to |
| 218 | This field takes precedence over @samp{Reply-to}. It is used because | 168 | This field takes precedence over @samp{Reply-to}. It is used because |
| @@ -225,70 +175,88 @@ you reply to a message from a mailing list that you are subscribed to. | |||
| 225 | It usually indicates that you want replies to go to the list, and that | 175 | It usually indicates that you want replies to go to the list, and that |
| 226 | you do not need an extra copy sent directly to you. | 176 | you do not need an extra copy sent directly to you. |
| 227 | 177 | ||
| 228 | @vindex mail-mailing-lists | 178 | @c Message mode handles this differently... |
| 229 | The variable @code{mail-mailing-lists} holds a list of mailing list | 179 | @c @vindex mail-mailing-lists |
| 230 | addresses that you are subscribed to. If it is non-@code{nil}, Emacs | 180 | @c The variable @code{mail-mailing-lists} holds a list of mailing list |
| 231 | inserts an appropriate @samp{Mail-followup-to} header when sending mail | 181 | @c addresses that you are subscribed to. If it is non-@code{nil}, Emacs |
| 232 | to a mailing list. | 182 | @c inserts an appropriate @samp{Mail-followup-to} header when sending mail |
| 233 | 183 | @c to a mailing list. | |
| 234 | @c There is also "Sent-via", added by C-c C-v, but it does not seem | ||
| 235 | @c particularly useful (?). | ||
| 236 | 184 | ||
| 237 | @item In-reply-to | 185 | @item In-reply-to |
| 238 | This field contains a piece of text describing the message you are | 186 | A piece of text describing the message you are replying to. Some mail |
| 239 | replying to. Some mail systems can use this information to correlate | 187 | systems can use this information to correlate related pieces of mail. |
| 240 | related pieces of mail. Normally this field is filled in by Rmail | 188 | Normally, you never need to think about this, because it is filled in |
| 241 | when you reply to a message in Rmail, and you never need to | 189 | automatically when you reply to a message in Rmail (or any other mail |
| 242 | think about it (@pxref{Rmail}). | 190 | program built into Emacs). |
| 243 | 191 | ||
| 244 | @item References | 192 | @item References |
| 245 | This field lists the Message-Ids of related previous messages (a | 193 | The Message-Ids of previous related messages (a Message-Id is a unique |
| 246 | Message-Id is a unique identifier generated when a message is sent). | 194 | identifier generated when a message is sent). Like |
| 247 | Rmail sets up this field automatically when you reply to a message. | 195 | @samp{In-reply-to}, this is normally set up automatically for you. |
| 248 | @end table | 196 | @end table |
| 249 | 197 | ||
| 250 | The @samp{To}, @samp{CC}, and @samp{BCC} header fields can appear | 198 | @noindent |
| 251 | any number of times, and each such header field can contain multiple | 199 | The @samp{To}, @samp{CC}, and @samp{BCC} fields can appear any number |
| 252 | addresses, separated by commas. This way, you can specify any number | 200 | of times, and each such header field can contain multiple addresses, |
| 253 | of places to send the message. These fields can also have | 201 | separated by commas. This way, you can specify any number of places |
| 254 | continuation lines: one or more lines starting with whitespace, | 202 | to send the message. These fields can also have continuation lines: |
| 255 | following the starting line of the field, are considered part of the | 203 | one or more lines starting with whitespace, following the starting |
| 256 | field. Here's an example of a @samp{To} field with a continuation | 204 | line of the field, are considered part of the field. Here's an |
| 257 | line: | 205 | example of a @samp{To} field with a continuation line: |
| 258 | 206 | ||
| 259 | @example | 207 | @example |
| 260 | @group | 208 | @group |
| 261 | To: foo@@here.net, this@@there.net, | 209 | To: foo@@example.net, this@@example.net, |
| 262 | me@@gnu.cambridge.mass.usa.earth.spiral3281 | 210 | bob@@example.com |
| 263 | @end group | 211 | @end group |
| 264 | @end example | 212 | @end example |
| 265 | 213 | ||
| 214 | @vindex user-full-name | ||
| 215 | @vindex user-mail-address | ||
| 216 | The default contents of the @samp{From} header field are computed | ||
| 217 | from the variables @code{user-full-name} and @code{user-mail-address}. | ||
| 218 | On some operating systems, Emacs initializes these two variables using | ||
| 219 | environment variables (@pxref{General Variables}). If this | ||
| 220 | information is unavailable or wrong, you can customize the variables | ||
| 221 | yourself (@pxref{Easy Customization}). | ||
| 222 | |||
| 266 | @vindex mail-from-style | 223 | @vindex mail-from-style |
| 267 | When you send the message, if you didn't write a @samp{From} field | 224 | The value of the variable @code{mail-from-style} specifies how to |
| 268 | yourself, Emacs puts in one for you, using @code{user-mail-address}. | 225 | format the address in the @samp{From} field: |
| 269 | The variable @code{mail-from-style} controls the format: | 226 | |
| 270 | 227 | @table @asis | |
| 271 | @table @code | 228 | @item @code{nil} |
| 272 | @item nil | 229 | Use just the address, as in @samp{king@@grassland.com}. |
| 273 | Use just the email address, as in @samp{king@@grassland.com}. | 230 | @item @code{parens} |
| 274 | @item parens | 231 | Use both address and full name, as in:@* |
| 275 | Use both email address and full name, as in:@* | ||
| 276 | @samp{king@@grassland.com (Elvis Parsley)}. | 232 | @samp{king@@grassland.com (Elvis Parsley)}. |
| 277 | @item angles | 233 | @item @code{angles} |
| 278 | Use both email address and full name, as in:@* | 234 | Use both address and full name, as in:@* |
| 279 | @samp{Elvis Parsley <king@@grassland.com>}. | 235 | @samp{Elvis Parsley <king@@grassland.com>}. |
| 280 | @item system-default | 236 | @item any other value |
| 281 | Allow the system to insert the @samp{From} field. | 237 | Use @code{angles} for most addresses. However, if the address must be |
| 238 | ``quoted'' to remain syntactically-valid under the @code{angles} | ||
| 239 | format but not under the @code{parens} format, use @code{parens} | ||
| 240 | instead. This is the default. | ||
| 282 | @end table | 241 | @end table |
| 283 | 242 | ||
| 284 | @c There is also mail-specify-envelope-from and mail-envelope-from, but | 243 | @c There is also mail-specify-envelope-from and mail-envelope-from, but |
| 285 | @c these are probably not topics for the Emacs manual. | 244 | @c these are probably not topics for the Emacs manual. |
| 286 | 245 | ||
| 287 | @vindex mail-default-headers | 246 | @vindex mail-default-headers |
| 288 | You can direct Emacs to insert certain default headers into the | 247 | You can direct Emacs to insert certain default headers into the mail |
| 289 | outgoing message by setting the variable @code{mail-default-headers} | 248 | buffer by setting the variable @code{mail-default-headers} to a |
| 290 | to a string. Then @code{C-x m} inserts this string into the message | 249 | string. Then @kbd{C-x m} inserts this string into the message |
| 291 | headers. If the default header fields are not appropriate for a | 250 | headers. For example, here is how to add a @samp{Reply-to} and |
| 251 | @samp{FCC} header to each message: | ||
| 252 | |||
| 253 | @smallexample | ||
| 254 | (setq mail-default-headers | ||
| 255 | "Reply-to: foo@@example.com\nFCC: ~/Mail/sent") | ||
| 256 | @end smallexample | ||
| 257 | |||
| 258 | @noindent | ||
| 259 | If the default header fields are not appropriate for a | ||
| 292 | particular message, edit them as necessary before sending the message. | 260 | particular message, edit them as necessary before sending the message. |
| 293 | 261 | ||
| 294 | @node Mail Aliases | 262 | @node Mail Aliases |
| @@ -296,29 +264,26 @@ particular message, edit them as necessary before sending the message. | |||
| 296 | @cindex mail aliases | 264 | @cindex mail aliases |
| 297 | @cindex @file{.mailrc} file | 265 | @cindex @file{.mailrc} file |
| 298 | @cindex mailrc file | 266 | @cindex mailrc file |
| 267 | @vindex mail-personal-alias-file | ||
| 299 | 268 | ||
| 300 | You can define @dfn{mail aliases} in a file named @file{~/.mailrc}. | 269 | You can define @dfn{mail aliases}, which are short mnemonic names |
| 301 | These are short mnemonic names which stand for mail addresses or groups of | 270 | that stand for mail addresses or groups of mail addresses. By |
| 302 | mail addresses. Like many other mail programs, Emacs expands aliases | 271 | default, mail aliases are defined in the file @file{~/.mailrc}. You |
| 303 | when they occur in the @samp{To}, @samp{From}, @samp{CC}, @samp{BCC}, and | 272 | can specify a different file name to use, by setting the variable |
| 304 | @samp{Reply-to} fields, plus their @samp{Resent-} variants. | 273 | @code{mail-personal-alias-file}. |
| 305 | @c The list is defined by mail-address-field-regexp. | ||
| 306 | 274 | ||
| 307 | To define an alias in @file{~/.mailrc}, write a line in the following | 275 | To define an alias in @file{.mailrc}, write a line in the following |
| 308 | format: | 276 | format: |
| 309 | 277 | ||
| 310 | @example | 278 | @example |
| 311 | alias @var{shortaddress} @var{fulladdresses} | 279 | alias @var{nick} @var{fulladdresses} |
| 312 | @end example | 280 | @end example |
| 313 | 281 | ||
| 314 | @noindent | 282 | @noindent |
| 315 | Here @var{fulladdresses} stands for one or more mail addresses for | 283 | This means that @var{nick} should expand into @var{fulladdresses}, |
| 316 | @var{shortaddress} to expand into. Separate multiple addresses with | 284 | where @var{fulladdresses} can be either a single address, or multiple |
| 317 | spaces; if an address contains a space, quote the whole address with a | 285 | addresses separated with spaces. For instance, to make @code{maingnu} |
| 318 | pair of double quotes. | 286 | stand for @code{gnu@@gnu.org} plus a local address of your own, put in |
| 319 | |||
| 320 | For instance, to make @code{maingnu} stand for | ||
| 321 | @code{gnu@@gnu.org} plus a local address of your own, put in | ||
| 322 | this line:@refill | 287 | this line:@refill |
| 323 | 288 | ||
| 324 | @example | 289 | @example |
| @@ -326,329 +291,232 @@ alias maingnu gnu@@gnu.org local-gnu | |||
| 326 | @end example | 291 | @end example |
| 327 | 292 | ||
| 328 | @noindent | 293 | @noindent |
| 329 | Addresses specified in this way should use double quotes around an | 294 | If an address contains a space, quote the whole address with a pair of |
| 330 | entire address when the address contains spaces. But you need not | 295 | double quotes, like this: |
| 331 | include double quotes around parts of the address, such as the person's | ||
| 332 | full name. Emacs puts them in if they are needed. For example, | ||
| 333 | 296 | ||
| 334 | @example | 297 | @example |
| 335 | alias jsmith "John Q. Smith <none@@example.com>" | 298 | alias jsmith "John Q. Smith <none@@example.com>" |
| 336 | @end example | 299 | @end example |
| 337 | 300 | ||
| 338 | @noindent | 301 | @noindent |
| 339 | is correct in @samp{.mailrc}. Emacs will insert the address as | 302 | Note that you need not include double quotes around individual parts |
| 303 | of the address, such as the person's full name. Emacs puts them in if | ||
| 304 | they are needed. For instance, it inserts the above address as | ||
| 340 | @samp{"John Q. Smith" <none@@example.com>}. | 305 | @samp{"John Q. Smith" <none@@example.com>}. |
| 341 | 306 | ||
| 342 | Emacs also recognizes ``include'' commands in @samp{.mailrc} files. | 307 | Emacs also recognizes ``include'' commands in @file{.mailrc}. They |
| 343 | They look like this: | 308 | look like this: |
| 344 | 309 | ||
| 345 | @example | 310 | @example |
| 346 | source @var{filename} | 311 | source @var{filename} |
| 347 | @end example | 312 | @end example |
| 348 | 313 | ||
| 349 | @noindent | 314 | @noindent |
| 350 | The file @file{~/.mailrc} is used primarily by other mail-reading | 315 | The @file{.mailrc} file is not unique to Emacs; many other |
| 351 | programs; it can contain various other commands. Emacs ignores | 316 | mail-reading programs use it for mail aliases, and it can contain |
| 352 | everything in it except for alias definitions and include commands. | 317 | various other commands. However, Emacs ignores everything except |
| 353 | 318 | alias definitions and include commands. | |
| 354 | @findex define-mail-alias | ||
| 355 | Another way to define a mail alias, within Emacs alone, is with the | ||
| 356 | @code{define-mail-alias} command. It prompts for the alias and then the | ||
| 357 | full address. You can use it to define aliases in your @file{.emacs} | ||
| 358 | file, like this: | ||
| 359 | |||
| 360 | @example | ||
| 361 | (define-mail-alias "maingnu" "gnu@@gnu.org") | ||
| 362 | @end example | ||
| 363 | |||
| 364 | @vindex mail-aliases | ||
| 365 | @code{define-mail-alias} records aliases by adding them to a | ||
| 366 | variable named @code{mail-aliases}. If you are comfortable with | ||
| 367 | manipulating Lisp lists, you can set @code{mail-aliases} directly. The | ||
| 368 | initial value of @code{mail-aliases} is @code{t}, which means that | ||
| 369 | Emacs should read @file{.mailrc} to get the proper value. | ||
| 370 | |||
| 371 | @vindex mail-personal-alias-file | ||
| 372 | You can specify a different file name to use instead of | ||
| 373 | @file{~/.mailrc} by setting the variable | ||
| 374 | @code{mail-personal-alias-file}. | ||
| 375 | |||
| 376 | @c There is also mail-alias-file for the system aliases. | ||
| 377 | 319 | ||
| 378 | @findex expand-mail-aliases | ||
| 379 | Normally, Emacs expands aliases when you send the message. You do not | ||
| 380 | need to expand mail aliases before sending the message, but you can | ||
| 381 | expand them if you want to see where the mail will actually go. To do | ||
| 382 | this, use the command @kbd{M-x expand-mail-aliases}; it expands all mail | ||
| 383 | aliases currently present in the mail headers that hold addresses. | ||
| 384 | |||
| 385 | If you like, you can have mail aliases expand as abbrevs, as soon as | ||
| 386 | you type them in (@pxref{Abbrevs}). To enable this feature, execute the | ||
| 387 | following: | ||
| 388 | |||
| 389 | @example | ||
| 390 | (add-hook 'mail-mode-hook 'mail-abbrevs-setup) | ||
| 391 | @end example | ||
| 392 | |||
| 393 | @noindent | ||
| 394 | @findex define-mail-abbrev | ||
| 395 | @vindex mail-abbrevs | ||
| 396 | This can go in your @file{.emacs} file. @xref{Hooks}. If you use this | ||
| 397 | feature, you must use @code{define-mail-abbrev} instead of | ||
| 398 | @code{define-mail-alias}; the latter does not work with this package. | ||
| 399 | Note that the mail abbreviation package uses the variable | ||
| 400 | @code{mail-abbrevs} instead of @code{mail-aliases}, and that all alias | ||
| 401 | names are converted to lower case. | ||
| 402 | |||
| 403 | @kindex C-c C-a @r{(Mail mode)} | ||
| 404 | @findex mail-abbrev-insert-alias | 320 | @findex mail-abbrev-insert-alias |
| 405 | The mail abbreviation package also provides the @kbd{C-c C-a} | 321 | Mail aliases expand as abbrevs---that is to say, as soon as you type |
| 406 | (@code{mail-abbrev-insert-alias}) command, which reads an alias | 322 | a word-separator character after an alias (@pxref{Abbrevs}). This |
| 407 | name (with completion) and inserts its definition at point. This is | 323 | expansion takes place only within the @samp{To}, @samp{From}, |
| 408 | useful when editing the message text itself or a header field such as | 324 | @samp{CC}, @samp{BCC}, and @samp{Reply-to} header fields (plus their |
| 409 | @samp{Subject} in which Emacs does not normally expand aliases. | 325 | @samp{Resent-} variants); it does not take place in other header |
| 410 | 326 | fields, such as @samp{Subject}. | |
| 411 | Note that abbrevs expand only if you insert a word-separator character | 327 | |
| 412 | afterward. However, you can rebind @kbd{C-n} and @kbd{M->} to cause | 328 | You can also insert an aliased address directly, using the command |
| 413 | expansion as well. Here's how to do that: | 329 | @kbd{M-x mail-abbrev-insert-alias}. This reads an alias name, with |
| 414 | 330 | completion, and inserts its definition at point. | |
| 415 | @smallexample | 331 | |
| 416 | (add-hook 'mail-mode-hook | 332 | @node Mail Commands |
| 417 | (lambda () | 333 | @section Mail Commands |
| 418 | (define-key | 334 | @cindex Message mode |
| 419 | mail-mode-map [remap next-line] 'mail-abbrev-next-line) | 335 | @cindex mode, Message |
| 420 | (define-key | 336 | |
| 421 | mail-mode-map [remap end-of-buffer] 'mail-abbrev-end-of-buffer))) | 337 | The default major mode for the @samp{*mail*} buffer is called |
| 422 | @end smallexample | 338 | Message mode. It behaves like Text mode in many ways, but provides |
| 423 | 339 | several additional commands on the @kbd{C-c} prefix, which make | |
| 424 | @node Mail Mode | 340 | editing a message more convenient. |
| 425 | @section Mail Mode | 341 | |
| 426 | @cindex Mail mode | 342 | In this section, we will describe some of the most commonly-used |
| 427 | @cindex mode, Mail | 343 | commands available in Message mode. |
| 428 | 344 | @ifnottex | |
| 429 | The major mode used in the mail buffer is Mail mode, which is much | 345 | Message mode also has its own manual, where its features are described |
| 430 | like Text mode except that various special commands are provided on the | 346 | in greater detail. @xref{Top,,Message, message, Message}. |
| 431 | @kbd{C-c} prefix. These commands all have to do specifically with | 347 | @end ifnottex |
| 432 | editing or sending the message. | ||
| 433 | |||
| 434 | Mail mode is normally used in buffers set up automatically by the | ||
| 435 | @code{mail} command and related commands. However, you can also switch | ||
| 436 | to Mail mode in a file-visiting buffer. This is a useful thing to do if | ||
| 437 | you have saved the text of a draft message in a file. | ||
| 438 | 348 | ||
| 439 | @menu | 349 | @menu |
| 440 | * Mail Sending:: Commands to send the message. | 350 | * Mail Sending:: Commands to send the message. |
| 441 | * Header Editing:: Commands to move to header fields and edit them. | 351 | * Header Editing:: Commands to move to header fields and edit them. |
| 442 | * Citing Mail:: Copying all or part of a message you are replying to. | 352 | * Citing Mail:: Quoting a message you are replying to. |
| 443 | * Mail Mode Misc:: Spell checking, signatures, etc. | 353 | * Mail Misc:: Attachments, spell checking, etc. |
| 444 | @end menu | 354 | @end menu |
| 445 | 355 | ||
| 446 | @node Mail Sending | 356 | @node Mail Sending |
| 447 | @subsection Mail Sending | 357 | @subsection Mail Sending |
| 448 | 358 | ||
| 449 | Mail mode has two commands for sending the message you have been | 359 | There are two commands to send a message you have been editing: |
| 450 | editing: | ||
| 451 | 360 | ||
| 452 | @table @kbd | 361 | @table @kbd |
| 453 | @item C-c C-s | ||
| 454 | Send the message, and leave the mail buffer selected (@code{mail-send}). | ||
| 455 | @item C-c C-c | 362 | @item C-c C-c |
| 456 | Send the message, and select some other buffer (@code{mail-send-and-exit}). | 363 | Send the message, and deselect the mail buffer (@code{message-send-and-exit}). |
| 364 | @item C-c C-s | ||
| 365 | Send the message, and leave the mail buffer selected (@code{message-send}). | ||
| 457 | @end table | 366 | @end table |
| 458 | 367 | ||
| 459 | @kindex C-c C-s @r{(Mail mode)} | 368 | @kindex C-c C-s @r{(Message mode)} |
| 460 | @kindex C-c C-c @r{(Mail mode)} | 369 | @kindex C-c C-c @r{(Message mode)} |
| 461 | @findex mail-send | 370 | @findex message-send |
| 462 | @findex mail-send-and-exit | 371 | If you want to send a message and be done with it, type @kbd{C-c |
| 463 | @vindex mail-send-hook | 372 | C-c} (@code{mail-send-and-exit}). This sends the message and then |
| 464 | @kbd{C-c C-s} (@code{mail-send}) sends the message and marks the mail | 373 | either deletes the window or switches to another buffer. It also |
| 465 | buffer unmodified, but leaves that buffer selected so that you can | 374 | ``buries'' the mail buffer, putting it at the lowest priority for |
| 466 | modify the message (perhaps with new recipients) and send it again. | 375 | reselection. This is the usual command for sending a message. |
| 467 | @kbd{C-c C-c} (@code{mail-send-and-exit}) sends and then deletes the | 376 | |
| 468 | window or switches to another buffer. It puts the mail buffer at the | 377 | @findex message-send-and-exit |
| 469 | lowest priority for reselection by default, since you are finished with | 378 | The command @kbd{C-c C-s} (@code{message-send}) sends the message |
| 470 | using it. This is the usual way to send the message. Sending a message | 379 | and marks the mail buffer unmodified, but leaves the buffer selected. |
| 471 | runs the hook @code{mail-send-hook}. | 380 | Use this command if you want to modify the message (perhaps with new |
| 472 | 381 | recipients) and send it again. | |
| 473 | @c Options not mentioned: mail-interactive, mail-use-dsn. | 382 | |
| 383 | @vindex message-send-hook | ||
| 384 | Sending a message runs the hook @code{message-send-hook}. | ||
| 474 | 385 | ||
| 475 | In a file-visiting buffer, sending the message does not clear the | 386 | In a file-visiting buffer, sending the message does not clear the |
| 476 | modified flag, because only saving the file should do that. Also, you | 387 | modified flag, because only saving the file should do that. Also, you |
| 477 | don't get a warning if you try to send the same message twice. | 388 | don't get a warning if you try to send the same message twice. |
| 478 | 389 | ||
| 479 | @c This is indexed in mule.texi, node "Recognize Coding". | 390 | @vindex sendmail-coding-system |
| 480 | @c @vindex sendmail-coding-system | 391 | When you send a message containing non-@acronym{ASCII} characters, |
| 481 | When you send a message that contains non-@acronym{ASCII} characters, they need | 392 | they need to be encoded with a coding system (@pxref{Coding Systems}). |
| 482 | to be encoded with a coding system (@pxref{Coding Systems}). Usually | 393 | Usually the coding system is specified automatically by your chosen |
| 483 | the coding system is specified automatically by your chosen language | 394 | language environment (@pxref{Language Environments}). You can |
| 484 | environment (@pxref{Language Environments}). You can explicitly specify | 395 | explicitly specify the coding system for outgoing mail by setting the |
| 485 | the coding system for outgoing mail by setting the variable | 396 | variable @code{sendmail-coding-system} (@pxref{Recognize Coding}). If |
| 486 | @code{sendmail-coding-system} (@pxref{Recognize Coding}). | 397 | the coding system thus determined does not handle the characters in a |
| 487 | 398 | particular message, Emacs asks you to select the coding system to use, | |
| 488 | If the coding system thus determined does not handle the characters in | ||
| 489 | a particular message, Emacs asks you to select the coding system to use, | ||
| 490 | showing a list of possible coding systems. | 399 | showing a list of possible coding systems. |
| 491 | 400 | ||
| 492 | @c Not mentioned: mail-send-nonascii. | ||
| 493 | |||
| 494 | @cindex SMTP | 401 | @cindex SMTP |
| 495 | @cindex Feedmail | 402 | @cindex Feedmail |
| 496 | @cindex Sendmail | 403 | @cindex Sendmail |
| 497 | @cindex Mailclient | 404 | @cindex Mailclient |
| 498 | @vindex send-mail-function | 405 | @vindex send-mail-function |
| 499 | The variable @code{send-mail-function} controls how the default mail | 406 | The variable @code{send-mail-function} controls how the default mail |
| 500 | user agent sends mail. It should be set to a function. In most cases, | 407 | user agent sends mail. It should be set to a function. In most |
| 501 | the default is @code{sendmail-send-it}, which delivers mail using the | 408 | cases, the default is @code{sendmail-send-it}, which delivers mail |
| 502 | Sendmail installation on the local host. On Mac OS X and MS-Windows, | 409 | using @command{sendmail} (or a @command{sendmail}-compatible program). |
| 503 | however, the default is normally @code{mailclient-send-it}, which | 410 | On Mac OS X and MS-Windows, however, the default is normally |
| 504 | passes the mail buffer on to the system's designated mail client (see | 411 | @code{mailclient-send-it}, which passes the mail buffer on to the |
| 505 | @file{mailclient.el}). To send mail through an SMTP server, set | 412 | system's designated mail client (see @file{mailclient.el}). To send |
| 506 | @code{send-mail-function} to @code{smtpmail-send-it} and set up the | 413 | mail through an SMTP server, set @code{send-mail-function} to |
| 507 | Emacs SMTP library (@pxref{Top,,Emacs SMTP Library, smtpmail, Sending | 414 | @code{smtpmail-send-it} and set up the Emacs SMTP library |
| 508 | mail via SMTP}). Another option is @code{feedmail-send-it} (see the | 415 | (@pxref{Top,,Emacs SMTP Library, smtpmail, Sending mail via SMTP}). |
| 509 | commentary section of the @file{feedmail.el} package). | 416 | Another option is @code{feedmail-send-it} (see the commentary section |
| 417 | of the @file{feedmail.el} package). | ||
| 510 | 418 | ||
| 511 | @node Header Editing | 419 | @node Header Editing |
| 512 | @subsection Mail Header Editing | 420 | @subsection Mail Header Editing |
| 513 | 421 | ||
| 514 | Mail mode provides special commands to move to particular header | 422 | Message mode provides the following special commands to move to |
| 515 | fields and to complete addresses in headers. | 423 | particular header fields and to complete addresses in headers. |
| 516 | 424 | ||
| 517 | @table @kbd | 425 | @table @kbd |
| 518 | @item C-c C-f C-t | 426 | @item C-c C-f C-t |
| 519 | Move to the @samp{To} header field, creating one if there is none | 427 | Move to the @samp{To} header (@code{message-goto-to}). |
| 520 | (@code{mail-to}). | ||
| 521 | @item C-c C-f C-s | 428 | @item C-c C-f C-s |
| 522 | Move to the @samp{Subject} header field, creating one if there is | 429 | Move to the @samp{Subject} header (@code{message-goto-subject}). |
| 523 | none (@code{mail-subject}). | ||
| 524 | @item C-c C-f C-c | 430 | @item C-c C-f C-c |
| 525 | Move to the @samp{CC} header field, creating one if there is none | 431 | Move to the @samp{CC} header (@code{message-goto-cc}). |
| 526 | (@code{mail-cc}). | ||
| 527 | @item C-c C-f C-b | 432 | @item C-c C-f C-b |
| 528 | Move to the @samp{BCC} header field, creating one if there is none | 433 | Move to the @samp{BCC} header (@code{message-goto-bcc}). |
| 529 | (@code{mail-bcc}). | ||
| 530 | @item C-c C-f C-r | 434 | @item C-c C-f C-r |
| 531 | Move to the @samp{Reply-To} header field, creating one if there is none | 435 | Move to the @samp{Reply-To} header (@code{message-goto-reply-to}). |
| 532 | (@code{mail-reply-to}). | ||
| 533 | @item C-c C-f C-a | ||
| 534 | Move to the @samp{Mail-Reply-To} header field, creating one if there is none | ||
| 535 | (@code{mail-mail-reply-to}). | ||
| 536 | @item C-c C-f C-l | ||
| 537 | Move to the @samp{Mail-Followup-To} header field, creating one if there is none | ||
| 538 | (@code{mail-mail-followup-to}). | ||
| 539 | @item C-c C-f C-f | 436 | @item C-c C-f C-f |
| 437 | Move to the @samp{Mail-Followup-To} header field | ||
| 438 | (@code{message-goto-followup-to}). | ||
| 439 | @item C-c C-f C-w | ||
| 540 | Add a new @samp{FCC} header field, with file-name completion | 440 | Add a new @samp{FCC} header field, with file-name completion |
| 541 | (@code{mail-fcc}). | 441 | (@code{message-goto-fcc}). |
| 542 | @c There is also C-c C-v, mail-sent-via, which adds one or more | 442 | @item C-c C-b |
| 543 | @c "Sent-via" headers, but I don't know what the point of that header is. | 443 | Move to the start of the message body (@code{message-goto-body}). |
| 544 | @item M-@key{TAB} | 444 | @item @key{TAB} |
| 545 | Complete a mailing address (@code{mail-complete}). | 445 | Complete a mailing address (@code{message-tab}). |
| 546 | @end table | 446 | @end table |
| 547 | 447 | ||
| 548 | @kindex C-c C-f C-t @r{(Mail mode)} | 448 | @kindex C-c C-f C-t @r{(Message mode)} |
| 549 | @findex mail-to | 449 | @findex message-goto-to |
| 550 | @kindex C-c C-f C-s @r{(Mail mode)} | 450 | @kindex C-c C-f C-s @r{(Message mode)} |
| 551 | @findex mail-subject | 451 | @findex message-goto-subject |
| 552 | @kindex C-c C-f C-c @r{(Mail mode)} | 452 | @kindex C-c C-f C-c @r{(Message mode)} |
| 553 | @findex mail-cc | 453 | @findex message-goto-cc |
| 554 | @kindex C-c C-f C-b @r{(Mail mode)} | 454 | @kindex C-c C-f C-b @r{(Message mode)} |
| 555 | @findex mail-bcc | 455 | @findex message-goto-bcc |
| 556 | @kindex C-c C-f C-r @r{(Mail mode)} | 456 | @kindex C-c C-f C-r @r{(Message mode)} |
| 557 | @findex mail-reply-to | 457 | @findex goto-reply-to |
| 558 | @kindex C-c C-f C-a @r{(Mail mode)} | 458 | @kindex C-c C-f C-f @r{(Message mode)} |
| 559 | @findex mail-mail-reply-to | 459 | @findex goto-followup-to |
| 560 | @kindex C-c C-f C-l @r{(Mail mode)} | 460 | @kindex C-c C-f C-w @r{(Message mode)} |
| 561 | @findex mail-mail-followup-to | 461 | @findex message-goto-fcc |
| 562 | @kindex C-c C-f C-f @r{(Mail mode)} | 462 | The commands to move point to particular header fields are all based |
| 563 | @findex mail-fcc | 463 | on the prefix @kbd{C-c C-f} (@samp{C-f} is for ``field''). If the |
| 564 | There are several commands to move point to particular header fields, | 464 | field in question does not exist, the command creates one (the |
| 565 | all based on the prefix @kbd{C-c C-f} (@samp{C-f} is for ``field''). | 465 | exception is @code{mail-fcc}, which creates a new field each time). |
| 566 | They are listed in the table above. If the field in question does not | 466 | |
| 567 | exist, these commands create one (the exception is @code{mail-fcc}, | 467 | @kindex C-c C-b @r{(Message mode)} |
| 568 | which creates a new field each time). We provide special motion | 468 | @findex mail-text |
| 569 | commands for these particular fields because they are the fields users | 469 | The command @kbd{C-c C-b} (@code{message-goto-body}) moves point to |
| 570 | most often want to edit. | 470 | just after the header separator line---that is, to the beginning of |
| 571 | 471 | the body. | |
| 572 | @findex mail-complete | 472 | |
| 573 | @kindex M-TAB @r{(Mail mode)} | 473 | @findex message-tab |
| 574 | @c `mail-complete-alist' specifies the headers. | 474 | @kindex TAB @r{(Message mode)} |
| 575 | While editing a header field that contains mailing addresses, such | 475 | While editing a header field that contains addresses, such as |
| 576 | as @samp{To:}, @samp{CC:} and @samp{BCC:}, you can complete a mailing | 476 | @samp{To:}, @samp{CC:} and @samp{BCC:}, you can complete an address by |
| 577 | address by typing @kbd{M-@key{TAB}} (@code{mail-complete}). It | 477 | typing @key{TAB} (@code{message-tab}). This attempts to insert the |
| 578 | inserts the full name corresponding to the address, if it can | 478 | full name corresponding to the address based on a couple of methods, |
| 579 | determine the full name. The variable @code{mail-complete-style} | 479 | including EUDC, a library that recognizes a number of directory server |
| 580 | controls whether to insert the full name, and what style to use, as in | 480 | protocols (@pxref{Top,,EUDC,eudc, The Emacs Unified Directory |
| 581 | @code{mail-from-style} (@pxref{Mail Headers}). (If your window | 481 | Client}). Failing that, it attempts to expand the address as a mail |
| 582 | manager defines @kbd{M-@key{TAB}} to switch windows, you can type | 482 | alias (@pxref{Mail Aliases}). If point is on a header field that does |
| 583 | @kbd{@key{ESC} @key{TAB}} or @kbd{C-M-i}.) | 483 | not take addresses, or if it is in the message body, then @key{TAB} |
| 584 | 484 | just inserts a tab character. | |
| 585 | For completion purposes, the valid mailing addresses are taken to be | ||
| 586 | the local users' names plus your personal mail aliases (@pxref{Mail | ||
| 587 | Aliases}). You can specify additional sources of valid addresses; | ||
| 588 | browse the customization group @samp{mailalias} to see the variables for | ||
| 589 | customizing this feature (@pxref{Customization Groups}). | ||
| 590 | |||
| 591 | If you type @kbd{M-@key{TAB}} in the body of the message, or on a | ||
| 592 | unrecognized header, @code{mail-complete} invokes the function specified | ||
| 593 | by @code{mail-complete-function}. By default, this is | ||
| 594 | @code{ispell-complete-word}, as in Text mode. | ||
| 595 | 485 | ||
| 596 | @node Citing Mail | 486 | @node Citing Mail |
| 597 | @subsection Citing Mail | 487 | @subsection Citing Mail |
| 598 | @cindex citing mail | 488 | @cindex citing mail |
| 599 | 489 | ||
| 600 | Mail mode also has commands for yanking or @dfn{citing} all or part of | ||
| 601 | a message that you are replying to. These commands are active only when | ||
| 602 | you started sending a message using an Rmail command. | ||
| 603 | |||
| 604 | @table @kbd | 490 | @table @kbd |
| 605 | @item C-c C-y | 491 | @item C-c C-y |
| 606 | Yank the selected message from Rmail (@code{mail-yank-original}). | 492 | Yank the selected message from Rmail (@code{message-yank-original}). |
| 607 | @item C-c C-r | ||
| 608 | Yank the region from the Rmail buffer (@code{mail-yank-region}). | ||
| 609 | @item C-c C-q | 493 | @item C-c C-q |
| 610 | Fill each paragraph cited from another message | 494 | Fill each paragraph cited from another message |
| 611 | (@code{mail-fill-yanked-message}). | 495 | (@code{message-fill-yanked-message}). |
| 612 | @c There is also mail-split-line, but it does not seem very useful. | ||
| 613 | @end table | 496 | @end table |
| 614 | 497 | ||
| 615 | @kindex C-c C-y @r{(Mail mode)} | 498 | @kindex C-c C-y @r{(Message mode)} |
| 616 | @findex mail-yank-original | 499 | @findex message-yank-original |
| 617 | When mail sending is invoked from the Rmail mail reader using an Rmail | 500 | @findex message-yank-prefix |
| 618 | command, @kbd{C-c C-y} can be used inside the mail buffer to insert the | 501 | You can use the command @kbd{C-c C-y} (@code{message-yank-original}) |
| 619 | text of the message you are replying to. Normally it indents each line | 502 | to @dfn{cite} a message that you are replying to. This inserts the |
| 620 | of that message three spaces and eliminates most header fields (as | 503 | text of that message into the mail buffer. This command is active |
| 621 | specified by the variable @code{mail-yank-ignored-headers}). A numeric | 504 | only when the mail buffer is invoked from a mail program running in |
| 622 | argument specifies the number of spaces to indent (the variable | 505 | Emacs, such as Rmail. |
| 623 | @code{mail-indentation-spaces} specifies the default number). An | 506 | |
| 624 | argument of just @kbd{C-u} says not to indent at all and not to | 507 | By default, Emacs inserts the string @samp{>} in front of each line |
| 625 | eliminate anything. @kbd{C-c C-y} always uses the current message from | 508 | of the cited text; this prefix string is specified by the variable |
| 626 | the Rmail buffer, so you can insert several old messages by selecting | 509 | @code{message-yank-prefix}. If you call @code{message-yank-original} |
| 627 | one in Rmail, switching to @samp{*mail*} and yanking it, then switching | 510 | with a prefix argument, the citation prefix is not inserted. |
| 628 | back to Rmail to select another. | 511 | |
| 629 | 512 | @kindex C-c C-q @r{(Message mode)} | |
| 630 | @vindex mail-yank-prefix | ||
| 631 | You can specify the text for @kbd{C-c C-y} to insert at the beginning | ||
| 632 | of each line: set @code{mail-yank-prefix} to the desired string. (A | ||
| 633 | value of @code{nil} means to use indentation; this is the default.) | ||
| 634 | However, @kbd{C-u C-c C-y} never adds anything at the beginning of the | ||
| 635 | inserted lines, regardless of the value of @code{mail-yank-prefix}. | ||
| 636 | |||
| 637 | @kindex C-c C-r @r{(Mail mode)} | ||
| 638 | @findex mail-yank-region | ||
| 639 | To yank just a part of an incoming message, set the region in Rmail to | ||
| 640 | the part you want; then go to the @samp{*Mail*} message and type | ||
| 641 | @kbd{C-c C-r} (@code{mail-yank-region}). Each line that is copied is | ||
| 642 | indented or prefixed according to @code{mail-yank-prefix}. | ||
| 643 | |||
| 644 | @kindex C-c C-q @r{(Mail mode)} | ||
| 645 | @findex mail-fill-yanked-message | 513 | @findex mail-fill-yanked-message |
| 646 | After using @kbd{C-c C-y} or @kbd{C-c C-r}, you can type @kbd{C-c C-q} | 514 | After using @kbd{C-c C-y}, you can type @kbd{C-c C-q} |
| 647 | (@code{mail-fill-yanked-message}) to fill the paragraphs of the yanked | 515 | (@code{message-fill-yanked-message}) to fill the paragraphs of the |
| 648 | old message or messages. One use of @kbd{C-c C-q} fills all such | 516 | cited message. One use of @kbd{C-c C-q} fills all such paragraphs, |
| 649 | paragraphs, each one individually. To fill a single paragraph of the | 517 | each one individually. To fill a single paragraph of the quoted |
| 650 | quoted message, use @kbd{M-q}. If filling does not automatically | 518 | message, use @kbd{M-q}. If filling does not automatically handle the |
| 651 | handle the type of citation prefix you use, try setting the fill prefix | 519 | type of citation prefix you use, try setting the fill prefix |
| 652 | explicitly. @xref{Filling}. | 520 | explicitly. @xref{Filling}. |
| 653 | 521 | ||
| 654 | @vindex mail-citation-hook | 522 | @vindex mail-citation-hook |
| @@ -657,91 +525,103 @@ explicitly. @xref{Filling}. | |||
| 657 | package, which provides more flexible citation | 525 | package, which provides more flexible citation |
| 658 | (@pxref{Introduction,,,sc, Supercite}). | 526 | (@pxref{Introduction,,,sc, Supercite}). |
| 659 | 527 | ||
| 660 | @c No need to mention: mail-citation-prefix-regexp. | 528 | @node Mail Misc |
| 529 | @subsection Mail Miscellany | ||
| 661 | 530 | ||
| 662 | @node Mail Mode Misc | 531 | @kindex C-c C-a @r{(Message mode)} |
| 663 | @subsection Mail Mode Miscellany | 532 | @findex mail-attach-file |
| 664 | 533 | @cindex MIME | |
| 665 | @table @kbd | 534 | @cindex Multipurpose Internet Mail Extensions |
| 666 | @item C-c C-t | 535 | You can @dfn{attach} a file to an outgoing message by typing |
| 667 | Move to the beginning of the message body text (@code{mail-text}). | 536 | @kbd{C-c C-a} (@code{mml-attach-file}) in the mail buffer. Attaching |
| 668 | @item C-c C-w | 537 | is done using the MIME (Multipurpose Internet Mail Extensions) |
| 669 | Insert a signature at the end of the message text (@code{mail-signature}). | 538 | standard. |
| 670 | @item C-c C-i @var{file} @key{RET} | 539 | |
| 671 | Insert the contents of @var{file} at the end of the message text | 540 | The @code{mml-attach-file} command prompts for the name of the file, |
| 672 | (@code{mail-attach-file}). | 541 | and for the attachment's @dfn{content type}, @dfn{description}, and |
| 673 | @item M-x ispell-message | 542 | @dfn{disposition}. The content type is normally detected |
| 674 | Perform spelling correction on the message text, but not on citations from | 543 | automatically; just type @key{RET} to accept the default. The |
| 675 | other messages, or the message headers. | 544 | description is a single line of text that the recipient will see next |
| 676 | @end table | 545 | to the attachment; you may also choose to leave this empty. The |
| 546 | disposition is either @samp{inline} (the default), which means the | ||
| 547 | recipient will see a link to the attachment within the message body, | ||
| 548 | or @samp{attachment}, which means the link will be separate from the | ||
| 549 | body. | ||
| 550 | |||
| 551 | The actual contents of the attached file are not inserted into the | ||
| 552 | mail buffer. Instead, some placeholder text is inserted into the mail | ||
| 553 | buffer, like this: | ||
| 677 | 554 | ||
| 678 | @kindex C-c C-t @r{(Mail mode)} | 555 | @smallexample |
| 679 | @findex mail-text | 556 | <#part type="text/plain" filename="~/foo.txt" disposition=inline> |
| 680 | @kbd{C-c C-t} (@code{mail-text}) moves point to just after the header | 557 | <#/part> |
| 681 | separator line---that is, to the beginning of the message body text. | 558 | @end smallexample |
| 682 | 559 | ||
| 683 | @kindex C-c C-w @r{(Mail mode)} | 560 | @noindent |
| 684 | @findex mail-signature | 561 | When you type @kbd{C-c C-c} or @kbd{C-c C-s} to send the message, the |
| 685 | @vindex mail-signature | 562 | attached file will be delivered with it. |
| 686 | @kbd{C-c C-w} (@code{mail-signature}) adds a standard piece of text | ||
| 687 | (your @dfn{mail signature}) at the end of the message to say more about who | ||
| 688 | you are. For example, it may contain telephone numbers, or your | ||
| 689 | physical location. The text comes from the variable | ||
| 690 | @code{mail-signature}. It can be a fixed string, or a Lisp expression | ||
| 691 | that returns a string. If it is @code{t} or @code{nil}, the function | ||
| 692 | inserts the contents of the file @code{mail-signature-file}. By | ||
| 693 | default, this is the file @file{~/.signature} in your home directory. | ||
| 694 | |||
| 695 | If the variable @code{mail-signature} has a non-@code{nil} value, | ||
| 696 | starting a mail automatically inserts your signature. Otherwise, you | ||
| 697 | must explicitly use the command @code{mail-signature}. If you want to | ||
| 698 | omit your signature from a particular message, just delete it from the | ||
| 699 | buffer before you send the message. | ||
| 700 | |||
| 701 | Convention says that the start of your signature should be marked by a | ||
| 702 | line whose contents are @samp{-- }. If your signature comes from a | ||
| 703 | file, this prefix is added for you, but in all other cases you must add | ||
| 704 | it yourself. The remainder of your signature should be no more than | ||
| 705 | four lines. | ||
| 706 | 563 | ||
| 707 | @findex ispell-message | 564 | @findex ispell-message |
| 708 | You can do spelling correction on the message text you have written | 565 | While composing a message, you can do spelling correction on the |
| 709 | with the command @kbd{M-x ispell-message}. If you have yanked an | 566 | message text by typing @kbd{M-x ispell-message}. If you have yanked |
| 710 | incoming message into the outgoing draft, this command skips what was | 567 | an incoming message into the outgoing draft, this command skips what |
| 711 | yanked, but it checks the text that you yourself inserted. (It looks | 568 | was yanked, but it checks the text that you yourself inserted (it |
| 712 | for indentation or @code{mail-yank-prefix} to distinguish the cited | 569 | looks for indentation or @code{mail-yank-prefix} to distinguish the |
| 713 | lines from your input.) @xref{Spelling}. | 570 | cited lines from your input). @xref{Spelling}. |
| 714 | |||
| 715 | @kindex C-c C-i @r{(Mail mode)} | ||
| 716 | @findex mail-attach-file | ||
| 717 | To include a file in the outgoing message, you can use @kbd{C-x i}, | ||
| 718 | the usual command to insert a file in the current buffer. But it is | ||
| 719 | often more convenient to use a special command, @kbd{C-c C-i} | ||
| 720 | (@code{mail-attach-file}). This command inserts the file contents at | ||
| 721 | the end of the buffer, after your signature (if any), with a delimiter | ||
| 722 | line that includes the file name. Note that this is not a MIME | ||
| 723 | attachment. | ||
| 724 | 571 | ||
| 725 | @vindex mail-mode-hook | 572 | @vindex mail-mode-hook |
| 726 | @vindex mail-setup-hook | 573 | @vindex mail-setup-hook |
| 727 | Turning on Mail mode (which @kbd{C-x m} does automatically) runs the | 574 | Turning on Message mode (which @kbd{C-x m} does automatically) runs |
| 728 | normal hooks @code{text-mode-hook} and @code{mail-mode-hook}. | 575 | the normal hooks @code{text-mode-hook} and @code{message-mode-hook}. |
| 729 | Initializing a new outgoing message runs the normal hook | 576 | Initializing a new outgoing message runs the normal hook |
| 730 | @code{mail-setup-hook}; if you want to add special fields to your mail | 577 | @code{message-setup-hook}; you can use this hook if you want to make |
| 731 | header or make other changes to the appearance of the mail buffer, use | 578 | changes to the appearance of the mail buffer. @xref{Hooks}. |
| 732 | that hook. @xref{Hooks}. | ||
| 733 | 579 | ||
| 734 | The main difference between these hooks is just when they are | 580 | The main difference between these hooks is just when they are |
| 735 | invoked. Whenever you type @kbd{M-x mail}, @code{mail-mode-hook} runs | 581 | invoked. Whenever you type @kbd{C-x m}, @code{message-mode-hook} runs |
| 736 | as soon as the @samp{*mail*} buffer is created. Then the | 582 | as soon as the mail buffer is created. Then the @code{message-setup} |
| 737 | @code{mail-setup} function inserts the default contents of the buffer. | 583 | function inserts the default contents of the buffer. After these |
| 738 | After these default contents are inserted, @code{mail-setup-hook} runs. | 584 | default contents are inserted, @code{message-setup-hook} runs. |
| 739 | 585 | ||
| 740 | If you use @kbd{M-x mail} to continue an existing composition, | 586 | If you use @kbd{C-x m} to continue an existing composition, |
| 741 | @code{mail-mode-hook} runs immediately after switching to the | 587 | @code{message-mode-hook} runs immediately after switching to the mail |
| 742 | @samp{*mail*} buffer. If the buffer is unmodified, or if you decide to | 588 | buffer. If the buffer is unmodified, or if you decide to erase it and |
| 743 | erase it and start again, @code{mail-setup-hook} runs after the default | 589 | start again, @code{message-setup-hook} runs after the default contents |
| 744 | contents are inserted. | 590 | are inserted. |
| 591 | |||
| 592 | @node Mail Signature | ||
| 593 | @section Mail Signature | ||
| 594 | |||
| 595 | @cindex mail signature | ||
| 596 | @vindex mail-signature-file | ||
| 597 | @vindex mail-signature | ||
| 598 | You can add a standard piece of text---your @dfn{mail | ||
| 599 | signature}---to the end of every message. This signature may contain | ||
| 600 | information such as your telephone number or your physical location. | ||
| 601 | The variable @code{mail-signature} determines how Emacs handles the | ||
| 602 | mail signature. | ||
| 603 | |||
| 604 | The default value of @code{mail-signature} is @code{t}; this means | ||
| 605 | to look for your mail signature in the file @file{~/.signature}. If | ||
| 606 | this file exists, its contents are automatically inserted into the end | ||
| 607 | of the mail buffer. You can change the signature file via the | ||
| 608 | variable @code{mail-signature-file}. | ||
| 609 | |||
| 610 | If you change @code{mail-signature} to a string, that specifies the | ||
| 611 | text of the signature directly. | ||
| 612 | |||
| 613 | @kindex C-c C-w @r{(Message mode)} | ||
| 614 | @findex message-insert-signature | ||
| 615 | If you change @code{mail-signature} to @code{nil}, Emacs will not | ||
| 616 | insert your mail signature automatically. You can insert your mail | ||
| 617 | signature by typing @kbd{C-c C-w} (@code{message-insert-signature}) in | ||
| 618 | the mail buffer. Emacs will look for your signature in the signature | ||
| 619 | file. | ||
| 620 | |||
| 621 | By convention, a mail signature should be marked by a line whose | ||
| 622 | contents are @samp{-- }. If your signature lacks this prefix, it is | ||
| 623 | added for you. The remainder of your signature should be no more than | ||
| 624 | four lines. | ||
| 745 | 625 | ||
| 746 | @node Mail Amusements | 626 | @node Mail Amusements |
| 747 | @section Mail Amusements | 627 | @section Mail Amusements |
| @@ -778,28 +658,32 @@ using this. | |||
| 778 | @node Mail Methods | 658 | @node Mail Methods |
| 779 | @section Mail-Composition Methods | 659 | @section Mail-Composition Methods |
| 780 | @cindex mail-composition methods | 660 | @cindex mail-composition methods |
| 661 | @cindex Mail mode | ||
| 662 | @cindex mode, Mail | ||
| 781 | 663 | ||
| 782 | @cindex MH mail interface | 664 | @cindex MH mail interface |
| 783 | @cindex Message mode for sending mail | 665 | @cindex Message mode for sending mail |
| 784 | In this chapter we have described the usual Emacs mode for editing | 666 | In this chapter we have described the usual Emacs mode for editing |
| 785 | and sending mail---Mail mode. Emacs has alternative facilities for | 667 | and sending mail---Message mode. This is only one of several |
| 786 | editing and sending mail, including | 668 | available modes. Prior to Emacs 23.2, the default mode was Mail mode, |
| 787 | MH-E and Message mode, not documented in this manual. | 669 | which is similar to Message mode in many respects but lacks features |
| 788 | @xref{Top,,MH-E,mh-e, The Emacs Interface to MH}. @xref{Top,,Message,message, | 670 | such as MIME support. Another available mode is MH-E |
| 789 | Message Manual}. You can choose any of them as your preferred method. | 671 | (@pxref{Top,,MH-E,mh-e, The Emacs Interface to MH}). |
| 790 | The commands @code{C-x m}, @code{C-x 4 m} and @code{C-x 5 m} use | ||
| 791 | whichever agent you have specified, as do various other Emacs commands | ||
| 792 | and facilities that send mail. | ||
| 793 | 672 | ||
| 794 | @vindex mail-user-agent | 673 | @vindex mail-user-agent |
| 795 | To specify your mail-composition method, customize the variable | 674 | You can choose any of these @dfn{mail user agents} as your preferred |
| 796 | @code{mail-user-agent}. Currently legitimate values include | 675 | method for editing and sending mail. The commands @code{C-x m}, |
| 797 | @code{sendmail-user-agent} (Mail mode), @code{mh-e-user-agent}, | 676 | @code{C-x 4 m} and @code{C-x 5 m} use whichever agent you have |
| 798 | @code{message-user-agent} and @code{gnus-user-agent}. | 677 | specified; so do various other parts of Emacs that send mail, such as |
| 678 | the bug reporter (@pxref{Bugs}). To specify a mail user agent, | ||
| 679 | customize the variable @code{mail-user-agent}. Currently, legitimate | ||
| 680 | values include @code{message-user-agent} (Message mode) | ||
| 681 | @code{sendmail-user-agent} (Mail mode), @code{gnus-user-agent}, and | ||
| 682 | @code{mh-e-user-agent}. | ||
| 799 | 683 | ||
| 800 | If you select a different mail-composition method, the information | 684 | If you select a different mail-composition method, the information |
| 801 | in this chapter about the @samp{*mail*} buffer and Mail mode does not | 685 | in this chapter about the mail buffer and Message mode does not apply; |
| 802 | apply; the other methods use a different format of text in a different | 686 | the other methods use a different format of text in a different |
| 803 | buffer, and their commands are different as well. | 687 | buffer, and their commands are different as well. |
| 804 | 688 | ||
| 805 | @vindex read-mail-command | 689 | @vindex read-mail-command |
diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi index e94770313cc..c00410e047a 100644 --- a/doc/emacs/text.texi +++ b/doc/emacs/text.texi | |||
| @@ -928,10 +928,10 @@ type @kbd{@key{ESC} @key{TAB}} or @kbd{C-M-i}. | |||
| 928 | @vindex text-mode-hook | 928 | @vindex text-mode-hook |
| 929 | Entering Text mode runs the hook @code{text-mode-hook}. Other major | 929 | Entering Text mode runs the hook @code{text-mode-hook}. Other major |
| 930 | modes related to Text mode also run this hook, followed by hooks of | 930 | modes related to Text mode also run this hook, followed by hooks of |
| 931 | their own; this includes Paragraph-Indent Text mode, Nroff mode, @TeX{} | 931 | their own; this includes Paragraph-Indent Text mode, Nroff mode, |
| 932 | mode, Outline mode, and Mail mode. Hook functions on | 932 | @TeX{} mode, Outline mode, and Message mode. Hook functions on |
| 933 | @code{text-mode-hook} can look at the value of @code{major-mode} to see | 933 | @code{text-mode-hook} can look at the value of @code{major-mode} to |
| 934 | which of these modes is actually being entered. @xref{Hooks}. | 934 | see which of these modes is actually being entered. @xref{Hooks}. |
| 935 | 935 | ||
| 936 | @node Outline Mode | 936 | @node Outline Mode |
| 937 | @section Outline Mode | 937 | @section Outline Mode |