aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2009-03-14 22:30:53 +0000
committerGlenn Morris2009-03-14 22:30:53 +0000
commitdf1a3e06de8f8ef2d12bf0badc5200cf0fe18a7e (patch)
tree20f3e2ba4ceef95b86209bcd6b56641ec04ed9ea
parent17a5c06bed5b1d22e7d4745acf889b5c4f278df2 (diff)
downloademacs-df1a3e06de8f8ef2d12bf0badc5200cf0fe18a7e.tar.gz
emacs-df1a3e06de8f8ef2d12bf0badc5200cf0fe18a7e.zip
(Mail Format): Fix typo. Add index entry for mail-header-separator.
(Mail Headers): Put info about initialization and changing in one place at the start. Update FCC section for mbox Rmail. Clarify From section, mention mail-setup-with-from. Clarify Reply-to section. Add Mail-followup-to and mail-mailing-lists. Clarify References section. (Mail Aliases): Update example, make less contentious. Update for name change of mail-interactive-insert-alias. (Mail Mode): Remove mention of `%' as a word separator. (Mail Sending): Mention mail-send-hook. Mention Mailclient. (Header Editing): Add reply-to, mail-reply-to, and mail-followup-to commands. Clarify FCC handling. In mail-complete, add reference to Mail Aliases section, and mention mail-complete-function. (Citing Mail): Mention mail-yank-ignored-headers and mail-citation-hook. (Mail Mode Misc): Clarify the mail-signature function. Add basic signature netiquette. Explain how the mail hooks work when continuing a composition. (Mail Amusements): Internationalize the spook section a bit. Remove the spook mail-setup-hook example, since it doesn't work well. Mention fortune-file. (Mail Methods): Mention read-mail-command.
-rw-r--r--doc/emacs/ChangeLog29
-rw-r--r--doc/emacs/sending.texi252
2 files changed, 194 insertions, 87 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 80a76adbd40..6a1df7168e2 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,7 +1,32 @@
12009-03-14 Glenn Morris <rgm@gnu.org>
2
3 * sending.texi (Mail Format): Fix typo. Add index entry for
4 mail-header-separator.
5 (Mail Headers): Put info about initialization and changing in one place
6 at the start. Update FCC section for mbox Rmail. Clarify From
7 section, mention mail-setup-with-from. Clarify Reply-to section.
8 Add Mail-followup-to and mail-mailing-lists. Clarify References
9 section.
10 (Mail Aliases): Update example, make less contentious.
11 Update for name change of mail-interactive-insert-alias.
12 (Mail Mode): Remove mention of `%' as a word separator.
13 (Mail Sending): Mention mail-send-hook. Mention Mailclient.
14 (Header Editing): Add reply-to, mail-reply-to, and mail-followup-to
15 commands. Clarify FCC handling. In mail-complete, add reference to
16 Mail Aliases section, and mention mail-complete-function.
17 (Citing Mail): Mention mail-yank-ignored-headers and mail-citation-hook.
18 (Mail Mode Misc): Clarify the mail-signature function. Add basic
19 signature netiquette. Explain how the mail hooks work when continuing
20 a composition.
21 (Mail Amusements): Internationalize the spook section a bit.
22 Remove the spook mail-setup-hook example, since it doesn't work well.
23 Mention fortune-file.
24 (Mail Methods): Mention read-mail-command.
25
12009-03-14 David Reitter <david.reitter@gmail.com> 262009-03-14 David Reitter <david.reitter@gmail.com>
2 27
3 * macos.texi (Mac / GNUstep Basics): remove references to Prefs panel 28 * macos.texi (Mac / GNUstep Basics): Remove references to Prefs panel
4 and NS resources following recent changes. 29 and NS resources following recent changes.
5 30
62009-03-10 Jason Rumney <jasonr@gnu.org> 312009-03-10 Jason Rumney <jasonr@gnu.org>
7 32
diff --git a/doc/emacs/sending.texi b/doc/emacs/sending.texi
index 56d158eb398..47ecc021f3c 100644
--- a/doc/emacs/sending.texi
+++ b/doc/emacs/sending.texi
@@ -62,6 +62,8 @@ with each mail buffer independently.
62directory for mail buffers, and also says where to put their auto-save 62directory for mail buffers, and also says where to put their auto-save
63files. 63files.
64 64
65@c Not mentioned: mail-bury-selects-summary. Really an Rmail feature.
66
65@ignore 67@ignore
66@c Commented out because it is not user-oriented; 68@c Commented out because it is not user-oriented;
67@c it doesn't say how to do some job. -- rms. 69@c it doesn't say how to do some job. -- rms.
@@ -77,7 +79,7 @@ separate manual. It may be useful for looking up names and addresses.
77 79
78@menu 80@menu
79* Format: Mail Format. Format of the mail being composed. 81* Format: Mail Format. Format of the mail being composed.
80* Headers: Mail Headers. Details of permitted mail header fields. 82* Headers: Mail Headers. Details of some standard mail header fields.
81* Aliases: Mail Aliases. Abbreviating and grouping mail addresses. 83* Aliases: Mail Aliases. Abbreviating and grouping mail addresses.
82* Mode: Mail Mode. Special commands for editing mail being composed. 84* Mode: Mail Mode. Special commands for editing mail being composed.
83* Amuse: Mail Amusements. Distracting the NSA; adding fortune messages. 85* Amuse: Mail Amusements. Distracting the NSA; adding fortune messages.
@@ -94,10 +96,11 @@ automatically when you send the message. Others, such as the recipient
94names, must be specified by you in order to send the message properly. 96names, must be specified by you in order to send the message properly.
95 97
96 In the mail buffer, you can insert and edit header fields using 98 In the mail buffer, you can insert and edit header fields using
97ordinary editing commands. Mail mode provides a commands to help you 99ordinary editing commands. Mail mode provides commands to help you
98edit some header fields, and some are preinitialized in the buffer 100edit some header fields, and some are preinitialized in the buffer
99automatically when appropriate. 101automatically when appropriate.
100 102
103@vindex mail-header-separator
101 The line in the buffer that says 104 The line in the buffer that says
102 105
103@example 106@example
@@ -118,7 +121,7 @@ might look like.
118To: gnu@@gnu.org 121To: gnu@@gnu.org
119CC: lungfish@@spam.org, byob@@spam.org 122CC: lungfish@@spam.org, byob@@spam.org
120Subject: The Emacs Manual 123Subject: The Emacs Manual
121--Text follows this line-- 124--text follows this line--
122Please ignore this message. 125Please ignore this message.
123@end example 126@end example
124 127
@@ -133,7 +136,10 @@ colon and optional whitespace comes the contents of the field.
133 136
134 You can use any name you like for a header field, but normally people 137 You can use any name you like for a header field, but normally people
135use only standard field names with accepted meanings. Here is a table 138use only standard field names with accepted meanings. Here is a table
136of fields commonly used in outgoing messages. 139of fields commonly used in outgoing messages. Emacs preinitializes some
140of these when you start to compose a mail, depending on various options
141you can set. You can delete or alter any header field before you send
142the message, if you wish.
137 143
138@table @samp 144@table @samp
139@item To 145@item To
@@ -166,11 +172,12 @@ copy of every message to some other @var{address}, set the variable
166 172
167@item FCC 173@item FCC
168This field contains the name of one file and directs Emacs to append a 174This field contains the name of one file and directs Emacs to append a
169copy of the message to that file when you send the message. If the file 175copy of the message to that file when you send the message. Emacs
170is in Rmail format, Emacs writes the message in Rmail format; otherwise, 176writes the message in mbox format, unless the file is in Babyl format
171Emacs writes the message in system mail file format. To specify 177(used by Rmail before Emacs 23), in which case Emacs writes Babyl. If
172more than one file, use several @samp{FCC} fields, with one file 178an Rmail buffer is visiting the file, Emacs updates it accordingly.
173name in each field. 179To specify more than one file, use several @samp{FCC} fields, with one
180file name in each field.
174 181
175@vindex mail-archive-file-name 182@vindex mail-archive-file-name
176To put a fixed file name in the @samp{FCC} field each time you start 183To put a fixed file name in the @samp{FCC} field each time you start
@@ -180,11 +187,16 @@ editing an outgoing message, set the variable
180file when it is sent. 187file when it is sent.
181 188
182@item From 189@item From
183Use the @samp{From} field to say who you are, when the account you are 190Use the @samp{From} field to say who you are. You might need to change
184using to send the mail is not your own. The contents of the @samp{From} 191this if the account you are using to send the mail is not your own. The
185field should be a valid mailing address, since replies will normally go 192contents of the @samp{From} field should be a valid mailing address,
186there. If you don't specify the @samp{From} field yourself, Emacs uses 193since replies will normally go there.
187the value of @code{user-mail-address} as the default. 194
195@vindex mail-setup-with-from
196Emacs 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}
199field when you send a mail, Emacs adds one.
188 200
189@item Reply-to 201@item Reply-to
190Use this field to direct replies to a different address. Most 202Use this field to direct replies to a different address. Most
@@ -197,11 +209,25 @@ any problems your @samp{From} address may cause for replies.
197@vindex mail-default-reply-to 209@vindex mail-default-reply-to
198To put a fixed @samp{Reply-to} address into every outgoing message, set 210To put a fixed @samp{Reply-to} address into every outgoing message, set
199the variable @code{mail-default-reply-to} to that address (as a string). 211the variable @code{mail-default-reply-to} to that address (as a string).
200Then @code{mail} initializes the message with a @samp{Reply-to} field as 212Then Emacs initializes the message with a @samp{Reply-to} field as
201specified. You can delete or alter that header field before you send 213specified. When you first compose a mail, if
202the message, if you wish. When Emacs starts up, if the environment 214@code{mail-default-reply-to} is @code{nil}, it is initialized from the
203variable @env{REPLYTO} is set, @code{mail-default-reply-to} is 215environment variable @env{REPLYTO}.
204initialized from that environment variable. 216
217@item Mail-followup-to
218 This field contains one or more addresses. It is typically used when
219you reply to a message from a mailing list that you are subscribed to.
220It usually indicates that you want replies to go to the list, and that
221you do not need an extra copy sent directly to you.
222
223@vindex mail-mailing-lists
224 The variable @code{mail-mailing-lists} holds a list of mailing list
225addresses that you are subscribed to. If it is non-@code{nil}, Emacs
226inserts an appropriate @samp{Mail-followup-to} header when sending mail
227to a mailing list.
228
229@c There is also "Sent-via", added by C-c C-v, but it does not seem
230@c particularly useful (?).
205 231
206@item In-reply-to 232@item In-reply-to
207This field contains a piece of text describing the message you are 233This field contains a piece of text describing the message you are
@@ -211,8 +237,9 @@ when you reply to a message in Rmail, and you never need to
211think about it (@pxref{Rmail}). 237think about it (@pxref{Rmail}).
212 238
213@item References 239@item References
214This field lists the message IDs of related previous messages. Rmail 240This field lists the message IDs of related previous messages (a message
215sets up this field automatically when you reply to a message. 241ID is a unique identifier generated when a message is sent). Rmail sets
242up this field automatically when you reply to a message.
216@end table 243@end table
217 244
218 The @samp{To}, @samp{CC}, and @samp{BCC} header fields can appear 245 The @samp{To}, @samp{CC}, and @samp{BCC} header fields can appear
@@ -233,8 +260,8 @@ To: foo@@here.net, this@@there.net,
233 260
234@vindex mail-from-style 261@vindex mail-from-style
235 When you send the message, if you didn't write a @samp{From} field 262 When you send the message, if you didn't write a @samp{From} field
236yourself, Emacs puts in one for you. The variable 263yourself, Emacs puts in one for you, using @code{user-mail-address}.
237@code{mail-from-style} controls the format: 264The variable @code{mail-from-style} controls the format:
238 265
239@table @code 266@table @code
240@item nil 267@item nil
@@ -249,6 +276,9 @@ Use both email address and full name, as in:@*
249Allow the system to insert the @samp{From} field. 276Allow the system to insert the @samp{From} field.
250@end table 277@end table
251 278
279@c There is also mail-specify-envelope-from and mail-envelope-from, but
280@c these are probably not topics for the Emacs manual.
281
252@vindex mail-default-headers 282@vindex mail-default-headers
253 You can direct Emacs to insert certain default headers into the 283 You can direct Emacs to insert certain default headers into the
254outgoing message by setting the variable @code{mail-default-headers} 284outgoing message by setting the variable @code{mail-default-headers}
@@ -268,6 +298,7 @@ These are short mnemonic names which stand for mail addresses or groups of
268mail addresses. Like many other mail programs, Emacs expands aliases 298mail addresses. Like many other mail programs, Emacs expands aliases
269when they occur in the @samp{To}, @samp{From}, @samp{CC}, @samp{BCC}, and 299when they occur in the @samp{To}, @samp{From}, @samp{CC}, @samp{BCC}, and
270@samp{Reply-to} fields, plus their @samp{Resent-} variants. 300@samp{Reply-to} fields, plus their @samp{Resent-} variants.
301@c The list is defined by mail-address-field-regexp.
271 302
272 To define an alias in @file{~/.mailrc}, write a line in the following 303 To define an alias in @file{~/.mailrc}, write a line in the following
273format: 304format:
@@ -280,7 +311,7 @@ alias @var{shortaddress} @var{fulladdresses}
280Here @var{fulladdresses} stands for one or more mail addresses for 311Here @var{fulladdresses} stands for one or more mail addresses for
281@var{shortaddress} to expand into. Separate multiple addresses with 312@var{shortaddress} to expand into. Separate multiple addresses with
282spaces; if an address contains a space, quote the whole address with a 313spaces; if an address contains a space, quote the whole address with a
283pair of double-quotes. 314pair of double quotes.
284 315
285For instance, to make @code{maingnu} stand for 316For instance, to make @code{maingnu} stand for
286@code{gnu@@gnu.org} plus a local address of your own, put in 317@code{gnu@@gnu.org} plus a local address of your own, put in
@@ -291,18 +322,18 @@ alias maingnu gnu@@gnu.org local-gnu
291@end example 322@end example
292 323
293@noindent 324@noindent
294Addresses specified in this way should use doublequotes around an 325Addresses specified in this way should use double quotes around an
295entire address when the address contains spaces. But you need not 326entire address when the address contains spaces. But you need not
296include doublequotes around parts of the address, such as the person's 327include double quotes around parts of the address, such as the person's
297full name. Emacs puts them in if they are needed. For example, 328full name. Emacs puts them in if they are needed. For example,
298 329
299@example 330@example
300alias chief-torturer "George W. Bush <bush@@whitehouse.gov>" 331alias pres "President of the United States <president@@whitehouse.gov>"
301@end example 332@end example
302 333
303@noindent 334@noindent
304is correct in @samp{.mailrc}. Emacs will insert the address as 335is correct in @samp{.mailrc}. Emacs will insert the address as
305@samp{"George W. Bush" <bush@@whitehouse.gov>}. 336@samp{"President of the United States" <president@@whitehouse.gov>}.
306 337
307 Emacs also recognizes ``include'' commands in @samp{.mailrc} files. 338 Emacs also recognizes ``include'' commands in @samp{.mailrc} files.
308They look like this: 339They look like this:
@@ -338,6 +369,8 @@ Emacs should read @file{.mailrc} to get the proper value.
338@file{~/.mailrc} by setting the variable 369@file{~/.mailrc} by setting the variable
339@code{mail-personal-alias-file}. 370@code{mail-personal-alias-file}.
340 371
372@c There is also mail-alias-file for the system aliases.
373
341@findex expand-mail-aliases 374@findex expand-mail-aliases
342 Normally, Emacs expands aliases when you send the message. You do not 375 Normally, Emacs expands aliases when you send the message. You do not
343need to expand mail aliases before sending the message, but you can 376need to expand mail aliases before sending the message, but you can
@@ -364,9 +397,9 @@ Note that the mail abbreviation package uses the variable
364names are converted to lower case. 397names are converted to lower case.
365 398
366@kindex C-c C-a @r{(Mail mode)} 399@kindex C-c C-a @r{(Mail mode)}
367@findex mail-interactive-insert-alias 400@findex mail-abbrev-insert-alias
368 The mail abbreviation package also provides the @kbd{C-c C-a} 401 The mail abbreviation package also provides the @kbd{C-c C-a}
369(@code{mail-interactive-insert-alias}) command, which reads an alias 402(@code{mail-abbrev-insert-alias}) command, which reads an alias
370name (with completion) and inserts its definition at point. This is 403name (with completion) and inserts its definition at point. This is
371useful when editing the message text itself or a header field such as 404useful when editing the message text itself or a header field such as
372@samp{Subject} in which Emacs does not normally expand aliases. 405@samp{Subject} in which Emacs does not normally expand aliases.
@@ -392,9 +425,7 @@ expansion as well. Here's how to do that:
392 The major mode used in the mail buffer is Mail mode, which is much 425 The major mode used in the mail buffer is Mail mode, which is much
393like Text mode except that various special commands are provided on the 426like Text mode except that various special commands are provided on the
394@kbd{C-c} prefix. These commands all have to do specifically with 427@kbd{C-c} prefix. These commands all have to do specifically with
395editing or sending the message. In addition, Mail mode defines the 428editing or sending the message.
396character @samp{%} as a word separator; this is helpful for using the
397word commands to edit mail addresses.
398 429
399 Mail mode is normally used in buffers set up automatically by the 430 Mail mode is normally used in buffers set up automatically by the
400@code{mail} command and related commands. However, you can also switch 431@code{mail} command and related commands. However, you can also switch
@@ -425,13 +456,17 @@ Send the message, and select some other buffer (@code{mail-send-and-exit}).
425@kindex C-c C-c @r{(Mail mode)} 456@kindex C-c C-c @r{(Mail mode)}
426@findex mail-send 457@findex mail-send
427@findex mail-send-and-exit 458@findex mail-send-and-exit
459@vindex mail-send-hook
428 @kbd{C-c C-s} (@code{mail-send}) sends the message and marks the mail 460 @kbd{C-c C-s} (@code{mail-send}) sends the message and marks the mail
429buffer unmodified, but leaves that buffer selected so that you can 461buffer unmodified, but leaves that buffer selected so that you can
430modify the message (perhaps with new recipients) and send it again. 462modify the message (perhaps with new recipients) and send it again.
431@kbd{C-c C-c} (@code{mail-send-and-exit}) sends and then deletes the 463@kbd{C-c C-c} (@code{mail-send-and-exit}) sends and then deletes the
432window or switches to another buffer. It puts the mail buffer at the 464window or switches to another buffer. It puts the mail buffer at the
433lowest priority for reselection by default, since you are finished with 465lowest priority for reselection by default, since you are finished with
434using it. This is the usual way to send the message. 466using it. This is the usual way to send the message. Sending a message
467runs the hook @code{mail-send-hook}.
468
469@c Options not mentioned: mail-interactive, mail-use-dsn.
435 470
436 In a file-visiting buffer, sending the message does not clear the 471 In a file-visiting buffer, sending the message does not clear the
437modified flag, because only saving the file should do that. Also, you 472modified flag, because only saving the file should do that. Also, you
@@ -450,18 +485,22 @@ the coding system for outgoing mail by setting the variable
450a particular message, Emacs asks you to select the coding system to use, 485a particular message, Emacs asks you to select the coding system to use,
451showing a list of possible coding systems. 486showing a list of possible coding systems.
452 487
488@c Not mentioned: mail-send-nonascii.
489
453@cindex SMTP 490@cindex SMTP
454@cindex Feedmail 491@cindex Feedmail
455@cindex Sendmail 492@cindex Sendmail
493@cindex Mailclient
456@vindex send-mail-function 494@vindex send-mail-function
457 The variable @code{send-mail-function} controls how the default mail 495 The variable @code{send-mail-function} controls how the default mail
458user agent sends mail. It should be set to a function. The default 496user agent sends mail. It should be set to a function. The default
459is @code{sendmail-send-it}, which delivers mail using the Sendmail 497is @code{sendmail-send-it}, which delivers mail using the Sendmail
460installation on the local host. To send mail through a SMTP server, 498installation on the local host. To send mail through a SMTP server,
461set it to @code{smtpmail-send-it} and set up the Emacs SMTP library 499set it to @code{smtpmail-send-it} and set up the Emacs SMTP library
462(@pxref{Top,,Emacs SMTP Library, smtpmail, Sending mail via SMTP}). A 500(@pxref{Top,,Emacs SMTP Library, smtpmail, Sending mail via SMTP}).
463third option is @code{feedmail-send-it}, see the commentary section of 501Other options are @code{feedmail-send-it} (see the commentary section of
464the @file{feedmail.el} package for more information. 502the @file{feedmail.el} package), and @code{mailclient-send-it} (see
503@file{mailclient.el}).
465 504
466@node Header Editing 505@node Header Editing
467@subsection Mail Header Editing 506@subsection Mail Header Editing
@@ -482,9 +521,20 @@ Move to the @samp{CC} header field, creating one if there is none
482@item C-c C-f C-b 521@item C-c C-f C-b
483Move to the @samp{BCC} header field, creating one if there is none 522Move to the @samp{BCC} header field, creating one if there is none
484(@code{mail-bcc}). 523(@code{mail-bcc}).
524@item C-c C-f C-r
525Move to the @samp{Reply-To} header field, creating one if there is none
526(@code{mail-reply-to}).
527@item C-c C-f C-a
528Move to the @samp{Mail-Reply-To} header field, creating one if there is none
529(@code{mail-mail-reply-to}).
530@item C-c C-f C-l
531Move to the @samp{Mail-Followup-To} header field, creating one if there is none
532(@code{mail-mail-followup-to}).
485@item C-c C-f C-f 533@item C-c C-f C-f
486Move to the @samp{FCC} header field, creating one if there is none 534Add a new @samp{FCC} header field, with file-name completion
487(@code{mail-fcc}). 535(@code{mail-fcc}).
536@c There is also C-c C-v, mail-sent-via, which adds one or more
537@c "Sent-via" headers, but I don't know what the point of that header is.
488@item M-@key{TAB} 538@item M-@key{TAB}
489Complete a mailing address (@code{mail-complete}). 539Complete a mailing address (@code{mail-complete}).
490@end table 540@end table
@@ -497,17 +547,25 @@ Complete a mailing address (@code{mail-complete}).
497@findex mail-cc 547@findex mail-cc
498@kindex C-c C-f C-b @r{(Mail mode)} 548@kindex C-c C-f C-b @r{(Mail mode)}
499@findex mail-bcc 549@findex mail-bcc
550@kindex C-c C-f C-r @r{(Mail mode)}
551@findex mail-reply-to
552@kindex C-c C-f C-a @r{(Mail mode)}
553@findex mail-mail-reply-to
554@kindex C-c C-f C-l @r{(Mail mode)}
555@findex mail-mail-followup-to
500@kindex C-c C-f C-f @r{(Mail mode)} 556@kindex C-c C-f C-f @r{(Mail mode)}
501@findex mail-fcc 557@findex mail-fcc
502 There are five commands to move point to particular header fields, all 558 There are several commands to move point to particular header fields,
503based on the prefix @kbd{C-c C-f} (@samp{C-f} is for ``field''). They 559all based on the prefix @kbd{C-c C-f} (@samp{C-f} is for ``field'').
504are listed in the table above. If the field in question does not exist, 560They are listed in the table above. If the field in question does not
505these commands create one. We provide special motion commands for these 561exist, these commands create one (the exception is @code{mail-fcc},
506particular fields because they are the fields users most often want to 562which creates a new field each time). We provide special motion
507edit. 563commands for these particular fields because they are the fields users
564most often want to edit.
508 565
509@findex mail-complete 566@findex mail-complete
510@kindex M-TAB @r{(Mail mode)} 567@kindex M-TAB @r{(Mail mode)}
568@c `mail-complete-alist' specifies the headers.
511 While editing a header field that contains mailing addresses, such 569 While editing a header field that contains mailing addresses, such
512as @samp{To:}, @samp{CC:} and @samp{BCC:}, you can complete a mailing 570as @samp{To:}, @samp{CC:} and @samp{BCC:}, you can complete a mailing
513address by typing @kbd{M-@key{TAB}} (@code{mail-complete}). It 571address by typing @kbd{M-@key{TAB}} (@code{mail-complete}). It
@@ -519,14 +577,15 @@ manager defines @kbd{M-@key{TAB}} to switch windows, you can type
519@kbd{@key{ESC} @key{TAB}} or @kbd{C-M-i}.) 577@kbd{@key{ESC} @key{TAB}} or @kbd{C-M-i}.)
520 578
521 For completion purposes, the valid mailing addresses are taken to be 579 For completion purposes, the valid mailing addresses are taken to be
522the local users' names plus your personal mail aliases. You can 580the local users' names plus your personal mail aliases (@pxref{Mail
523specify additional sources of valid addresses; see the customization 581Aliases}). You can specify additional sources of valid addresses;
524group @samp{mailalias} to see the variables for customizing this 582browse the customization group @samp{mailalias} to see the variables for
525feature (@pxref{Customization Groups}). 583customizing this feature (@pxref{Customization Groups}).
526 584
527 If you type @kbd{M-@key{TAB}} in the body of the message, 585 If you type @kbd{M-@key{TAB}} in the body of the message, or on a
528@code{mail-complete} invokes @code{ispell-complete-word}, as in Text 586unrecognized header, @code{mail-complete} invokes the function specified
529mode. 587by @code{mail-complete-function}. By default, this is
588@code{ispell-complete-word}, as in Text mode.
530 589
531@node Citing Mail 590@node Citing Mail
532@subsection Citing Mail 591@subsection Citing Mail
@@ -544,6 +603,7 @@ Yank the region from the Rmail buffer (@code{mail-yank-region}).
544@item C-c C-q 603@item C-c C-q
545Fill each paragraph cited from another message 604Fill each paragraph cited from another message
546(@code{mail-fill-yanked-message}). 605(@code{mail-fill-yanked-message}).
606@c There is also mail-split-line, but it does not seem very useful.
547@end table 607@end table
548 608
549@kindex C-c C-y @r{(Mail mode)} 609@kindex C-c C-y @r{(Mail mode)}
@@ -551,7 +611,8 @@ Fill each paragraph cited from another message
551 When mail sending is invoked from the Rmail mail reader using an Rmail 611 When mail sending is invoked from the Rmail mail reader using an Rmail
552command, @kbd{C-c C-y} can be used inside the mail buffer to insert 612command, @kbd{C-c C-y} can be used inside the mail buffer to insert
553the text of the message you are replying to. Normally it indents each line 613the text of the message you are replying to. Normally it indents each line
554of that message three spaces and eliminates most header fields. A numeric 614of that message three spaces and eliminates most header fields (as
615specified by the variable @code{mail-yank-ignored-headers}). A numeric
555argument specifies the number of spaces to indent. An argument of just 616argument specifies the number of spaces to indent. An argument of just
556@kbd{C-u} says not to indent at all and not to eliminate anything. 617@kbd{C-u} says not to indent at all and not to eliminate anything.
557@kbd{C-c C-y} always uses the current message from the Rmail buffer, 618@kbd{C-c C-y} always uses the current message from the Rmail buffer,
@@ -565,6 +626,7 @@ of each line: set @code{mail-yank-prefix} to the desired string. (A
565value of @code{nil} means to use indentation; this is the default.) 626value of @code{nil} means to use indentation; this is the default.)
566However, @kbd{C-u C-c C-y} never adds anything at the beginning of the 627However, @kbd{C-u C-c C-y} never adds anything at the beginning of the
567inserted lines, regardless of the value of @code{mail-yank-prefix}. 628inserted lines, regardless of the value of @code{mail-yank-prefix}.
629@c Indentation controlled by mail-indentation-spaces.
568 630
569@kindex C-c C-r @r{(Mail mode)} 631@kindex C-c C-r @r{(Mail mode)}
570@findex mail-yank-region 632@findex mail-yank-region
@@ -583,6 +645,14 @@ quoted message, use @kbd{M-q}. If filling does not automatically
583handle the type of citation prefix you use, try setting the fill prefix 645handle the type of citation prefix you use, try setting the fill prefix
584explicitly. @xref{Filling}. 646explicitly. @xref{Filling}.
585 647
648@vindex mail-citation-hook
649 You can customize mail citation through the hook
650@code{mail-citation-hook}. For example, you can use the Supercite
651package, which provides more flexible citation
652(@pxref{Introduction,,,sc, Supercite}).
653
654@c No need to mention: mail-citation-prefix-regexp.
655
586@node Mail Mode Misc 656@node Mail Mode Misc
587@subsection Mail Mode Miscellany 657@subsection Mail Mode Miscellany
588 658
@@ -590,14 +660,13 @@ explicitly. @xref{Filling}.
590@item C-c C-t 660@item C-c C-t
591Move to the beginning of the message body text (@code{mail-text}). 661Move to the beginning of the message body text (@code{mail-text}).
592@item C-c C-w 662@item C-c C-w
593Insert the file @file{~/.signature} at the end of the message text 663Insert a signature at the end of the message text (@code{mail-signature}).
594(@code{mail-signature}).
595@item C-c C-i @var{file} @key{RET} 664@item C-c C-i @var{file} @key{RET}
596Insert the contents of @var{file} at the end of the outgoing message 665Insert the contents of @var{file} at the end of the message text
597(@code{mail-attach-file}). 666(@code{mail-attach-file}).
598@item M-x ispell-message 667@item M-x ispell-message
599Perform spelling correction on the message text, but not on citations from 668Perform spelling correction on the message text, but not on citations from
600other messages. 669other messages, or the message headers.
601@end table 670@end table
602 671
603@kindex C-c C-t @r{(Mail mode)} 672@kindex C-c C-t @r{(Mail mode)}
@@ -609,19 +678,25 @@ separator line---that is, to the beginning of the message body text.
609@findex mail-signature 678@findex mail-signature
610@vindex mail-signature 679@vindex mail-signature
611 @kbd{C-c C-w} (@code{mail-signature}) adds a standard piece of text at 680 @kbd{C-c C-w} (@code{mail-signature}) adds a standard piece of text at
612the end of the message to say more about who you are. The text comes 681the end of the message to say more about who you are. For example, it
613from the file @file{~/.signature} in your home directory. To insert 682may contain telephone numbers, or your physical location. The text
614your signature automatically, set the variable @code{mail-signature} to 683comes from the variable @code{mail-signature}. It can be a fixed
615@code{t}; after that, starting a mail message automatically inserts the 684string, or a Lisp expression that returns a string. If it is @code{t}
616contents of your @file{~/.signature} file. If you want to omit your 685or @code{nil}, the function inserts the contents of the file
617signature from a particular message, delete it from the buffer before 686@code{mail-signature-file}. By default, this is the file
618you send the message. 687@file{~/.signature} in your home directory.
619 688
620 You can also set @code{mail-signature} to a string; then that string 689 If the variable @code{mail-signature} has a non-@code{nil} value,
621is inserted automatically as your signature when you start editing a 690starting a mail automatically inserts your signature. Otherwise, you
622message to send. If you set it to some other Lisp expression, the 691must explicitly use the command @code{mail-signature}. If you want to
623expression is evaluated each time, and its value (which should be a 692omit your signature from a particular message, just delete it from the
624string) specifies the signature. 693buffer before you send the message.
694
695 Convention says that the start of your signature should be marked by a
696line whose contents are @samp{-- }. If your signature comes from a
697file, this prefix is added for you, but in all other cases you must add
698it yourself. The remainder of your signature should be no more than
699four lines.
625 700
626@findex ispell-message 701@findex ispell-message
627 You can do spelling correction on the message text you have written 702 You can do spelling correction on the message text you have written
@@ -637,7 +712,7 @@ lines from your input.) @xref{Spelling}.
637the usual command to insert a file in the current buffer. But it is 712the usual command to insert a file in the current buffer. But it is
638often more convenient to use a special command, @kbd{C-c C-i} 713often more convenient to use a special command, @kbd{C-c C-i}
639(@code{mail-attach-file}). This command inserts the file contents at 714(@code{mail-attach-file}). This command inserts the file contents at
640the end of the buffer, after your signature if any, with a delimiter 715the end of the buffer, after your signature (if any), with a delimiter
641line that includes the file name. Note that this is not a MIME 716line that includes the file name. Note that this is not a MIME
642attachment. 717attachment.
643 718
@@ -656,6 +731,12 @@ as soon as the @samp{*mail*} buffer is created. Then the
656@code{mail-setup} function inserts the default contents of the buffer. 731@code{mail-setup} function inserts the default contents of the buffer.
657After these default contents are inserted, @code{mail-setup-hook} runs. 732After these default contents are inserted, @code{mail-setup-hook} runs.
658 733
734 If you use @kbd{M-x mail} to continue an existing composition,
735@code{mail-mode-hook} runs immediately after switching to the
736@samp{*mail*} buffer. If the buffer is unmodified, or if you decide to
737erase it and start again, @code{mail-setup-hook} runs after the default
738contents are inserted.
739
659@node Mail Amusements 740@node Mail Amusements
660@section Mail Amusements 741@section Mail Amusements
661 742
@@ -666,21 +747,13 @@ mail message. The keywords are chosen from a list of words that suggest
666you are discussing something subversive. 747you are discussing something subversive.
667 748
668 The idea behind this feature is the suspicion that the 749 The idea behind this feature is the suspicion that the
669NSA@footnote{The US National Security Agency.} snoops on 750NSA@footnote{The US National Security Agency.} and other intelligence
670all electronic mail messages that contain keywords suggesting they might 751agencies snoop on all electronic mail messages that contain keywords
671find them interesting. (The NSA says they don't, but that's what they 752suggesting they might find them interesting. (The agencies say that
672@emph{would} say.) The idea is that if lots of people add suspicious 753they don't, but that's what they @emph{would} say.) The idea is that if
673words to their messages, the NSA will get so busy with spurious input 754lots of people add suspicious words to their messages, the agencies will
674that they will have to give up reading it all. 755get so busy with spurious input that they will have to give up reading
675 756it all. Whether or not this is true, it at least amuses some people.
676 Here's how to insert spook keywords automatically whenever you start
677entering an outgoing message:
678
679@example
680(add-hook 'mail-setup-hook 'spook)
681@end example
682
683 Whether or not this confuses the NSA, it at least amuses people.
684 757
685@findex fortune-to-signature 758@findex fortune-to-signature
686@cindex fortune cookies 759@cindex fortune cookies
@@ -692,6 +765,10 @@ message into outgoing mail. To do this, add
692(add-hook 'mail-setup-hook 'fortune-to-signature) 765(add-hook 'mail-setup-hook 'fortune-to-signature)
693@end example 766@end example
694 767
768@noindent
769You will probably need to set the variable @code{fortune-file} before
770using this.
771
695@node Mail Methods 772@node Mail Methods
696@section Mail-Composition Methods 773@section Mail-Composition Methods
697@cindex mail-composition methods 774@cindex mail-composition methods
@@ -719,6 +796,11 @@ in this chapter about the @samp{*mail*} buffer and Mail mode does not
719apply; the other methods use a different format of text in a different 796apply; the other methods use a different format of text in a different
720buffer, and their commands are different as well. 797buffer, and their commands are different as well.
721 798
799@vindex read-mail-command
800 Similarly, to specify your preferred method for reading mail,
801customize the variable @code{read-mail-command}. The default is
802@code{rmail} (@pxref{Rmail}).
803
722@ignore 804@ignore
723 arch-tag: d8a3dfc3-5d87-45c5-a7f2-69871b8e4fd6 805 arch-tag: d8a3dfc3-5d87-45c5-a7f2-69871b8e4fd6
724@end ignore 806@end ignore