message.texi 86 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539
  1. \input texinfo @c -*-texinfo-*-
  2. @include gnus-overrides.texi
  3. @setfilename ../../info/message.info
  4. @settitle Message Manual
  5. @include docstyle.texi
  6. @synindex fn cp
  7. @synindex vr cp
  8. @synindex pg cp
  9. @copying
  10. This file documents Message, the Emacs message composition mode.
  11. Copyright @copyright{} 1996--2015 Free Software Foundation, Inc.
  12. @quotation
  13. Permission is granted to copy, distribute and/or modify this document
  14. under the terms of the GNU Free Documentation License, Version 1.3 or
  15. any later version published by the Free Software Foundation; with no
  16. Invariant Sections, with the Front-Cover Texts being ``A GNU Manual'',
  17. and with the Back-Cover Texts as in (a) below. A copy of the license
  18. is included in the section entitled ``GNU Free Documentation License''.
  19. (a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
  20. modify this GNU manual.''
  21. @end quotation
  22. @end copying
  23. @dircategory Emacs network features
  24. @direntry
  25. * Message: (message). Mail and news composition mode that
  26. goes with Gnus.
  27. @end direntry
  28. @iftex
  29. @finalout
  30. @end iftex
  31. @titlepage
  32. @ifset WEBHACKDEVEL
  33. @title Message Manual (DEVELOPMENT VERSION)
  34. @end ifset
  35. @ifclear WEBHACKDEVEL
  36. @title Message Manual
  37. @end ifclear
  38. @author by Lars Magne Ingebrigtsen
  39. @page
  40. @vskip 0pt plus 1filll
  41. @insertcopying
  42. @end titlepage
  43. @summarycontents
  44. @contents
  45. @node Top
  46. @top Message
  47. @ifnottex
  48. @insertcopying
  49. @end ifnottex
  50. All message composition from Gnus (both mail and news) takes place in
  51. Message mode buffers.
  52. @menu
  53. * Interface:: Setting up message buffers.
  54. * Commands:: Commands you can execute in message mode buffers.
  55. * Variables:: Customizing the message buffers.
  56. * Compatibility:: Making Message backwards compatible.
  57. * Appendices:: More technical things.
  58. * GNU Free Documentation License:: The license for this documentation.
  59. * Index:: Variable, function and concept index.
  60. * Key Index:: List of Message mode keys.
  61. @end menu
  62. @c Adjust ../Makefile.in if you change the following lines:
  63. Message is distributed with Gnus. The Gnus distribution
  64. @c
  65. corresponding to this manual is Gnus v5.13
  66. @node Interface
  67. @chapter Interface
  68. When a program (or a person) wants to respond to a message---reply,
  69. follow up, forward, cancel---the program (or person) should just put
  70. point in the buffer where the message is and call the required command.
  71. @code{Message} will then pop up a new @code{message} mode buffer with
  72. appropriate headers filled out, and the user can edit the message before
  73. sending it.
  74. @menu
  75. * New Mail Message:: Editing a brand new mail message.
  76. * New News Message:: Editing a brand new news message.
  77. * Reply:: Replying via mail.
  78. * Wide Reply:: Responding to all people via mail.
  79. * Followup:: Following up via news.
  80. * Canceling News:: Canceling a news article.
  81. * Superseding:: Superseding a message.
  82. * Forwarding:: Forwarding a message via news or mail.
  83. * Resending:: Resending a mail message.
  84. * Bouncing:: Bouncing a mail message.
  85. * Mailing Lists:: Send mail to mailing lists.
  86. @end menu
  87. You can customize the Message Mode tool bar, see @kbd{M-x
  88. customize-apropos RET message-tool-bar}. This feature is only available
  89. in Emacs.
  90. @node New Mail Message
  91. @section New Mail Message
  92. @findex message-mail
  93. The @code{message-mail} command pops up a new message buffer.
  94. Two optional parameters are accepted: The first will be used as the
  95. @code{To} header and the second as the @code{Subject} header. If these
  96. are @code{nil}, those two headers will be empty.
  97. @node New News Message
  98. @section New News Message
  99. @findex message-news
  100. The @code{message-news} command pops up a new message buffer.
  101. This function accepts two optional parameters. The first will be used
  102. as the @code{Newsgroups} header and the second as the @code{Subject}
  103. header. If these are @code{nil}, those two headers will be empty.
  104. @node Reply
  105. @section Reply
  106. @findex message-reply
  107. The @code{message-reply} function pops up a message buffer that's a
  108. reply to the message in the current buffer.
  109. @vindex message-reply-to-function
  110. Message uses the normal methods to determine where replies are to go
  111. (@pxref{Responses}), but you can change the behavior to suit your needs
  112. by fiddling with the @code{message-reply-to-function} variable.
  113. If you want the replies to go to the @code{Sender} instead of the
  114. @code{From}, you could do something like this:
  115. @lisp
  116. (setq message-reply-to-function
  117. (lambda ()
  118. (cond ((equal (mail-fetch-field "from") "somebody")
  119. (list (cons 'To (mail-fetch-field "sender"))))
  120. (t
  121. nil))))
  122. @end lisp
  123. This function will be called narrowed to the head of the article that is
  124. being replied to.
  125. As you can see, this function should return a list. In this case, it
  126. returns @code{((To . "Whom"))} if it has an opinion as to what the To
  127. header should be. If it does not, it should just return @code{nil}, and
  128. the normal methods for determining the To header will be used.
  129. Each list element should be a cons, where the @sc{car} should be the
  130. name of a header (e.g., @code{Cc}) and the @sc{cdr} should be the header
  131. value (e.g., @samp{larsi@@ifi.uio.no}). All these headers will be
  132. inserted into the head of the outgoing mail.
  133. @node Wide Reply
  134. @section Wide Reply
  135. @findex message-wide-reply
  136. The @code{message-wide-reply} pops up a message buffer that's a wide
  137. reply to the message in the current buffer. A @dfn{wide reply} is a
  138. reply that goes out to all people listed in the @code{To}, @code{From}
  139. (or @code{Reply-to}) and @code{Cc} headers.
  140. @vindex message-wide-reply-to-function
  141. Message uses the normal methods to determine where wide replies are to go,
  142. but you can change the behavior to suit your needs by fiddling with the
  143. @code{message-wide-reply-to-function}. It is used in the same way as
  144. @code{message-reply-to-function} (@pxref{Reply}).
  145. @vindex message-dont-reply-to-names
  146. Addresses that match the @code{message-dont-reply-to-names} regular
  147. expression (or list of regular expressions) will be removed from the
  148. @code{Cc} header. A value of @code{nil} means exclude your name only.
  149. @vindex message-prune-recipient-rules
  150. @code{message-prune-recipient-rules} is used to prune the addresses
  151. used when doing a wide reply. It's meant to be used to remove
  152. duplicate addresses and the like. It's a list of lists, where the
  153. first element is a regexp to match the address to trigger the rule,
  154. and the second is a regexp that will be expanded based on the first,
  155. to match addresses to be pruned.
  156. It's complicated to explain, but it's easy to use.
  157. For instance, if you get an email from @samp{foo@@example.org}, but
  158. @samp{foo@@zot.example.org} is also in the @code{Cc} list, then your
  159. wide reply will go out to both these addresses, since they are unique.
  160. To avoid this, do something like the following:
  161. @lisp
  162. (setq message-prune-recipient-rules
  163. '(("^\\([^@@]+\\)@@\\(.*\\)" "\\1@@.*[.]\\2")))
  164. @end lisp
  165. If, for instance, you want all wide replies that involve messages from
  166. @samp{cvs@@example.org} to go to that address, and nowhere else (i.e.,
  167. remove all other recipients if @samp{cvs@@example.org} is in the
  168. recipient list:
  169. @lisp
  170. (setq message-prune-recipient-rules
  171. '(("cvs@@example.org" ".")))
  172. @end lisp
  173. @vindex message-wide-reply-confirm-recipients
  174. If @code{message-wide-reply-confirm-recipients} is non-@code{nil} you
  175. will be asked to confirm that you want to reply to multiple
  176. recipients. The default is @code{nil}.
  177. @node Followup
  178. @section Followup
  179. @findex message-followup
  180. The @code{message-followup} command pops up a message buffer that's a
  181. followup to the message in the current buffer.
  182. @vindex message-followup-to-function
  183. Message uses the normal methods to determine where followups are to go,
  184. but you can change the behavior to suit your needs by fiddling with the
  185. @code{message-followup-to-function}. It is used in the same way as
  186. @code{message-reply-to-function} (@pxref{Reply}).
  187. @vindex message-use-followup-to
  188. The @code{message-use-followup-to} variable says what to do about
  189. @code{Followup-To} headers. If it is @code{use}, always use the value.
  190. If it is @code{ask} (which is the default), ask whether to use the
  191. value. If it is @code{t}, use the value unless it is @samp{poster}. If
  192. it is @code{nil}, don't use the value.
  193. @node Canceling News
  194. @section Canceling News
  195. @findex message-cancel-news
  196. The @code{message-cancel-news} command cancels the article in the
  197. current buffer.
  198. @vindex message-cancel-message
  199. The value of @code{message-cancel-message} is inserted in the body of
  200. the cancel message. The default is @samp{I am canceling my own
  201. article.}.
  202. @cindex Cancel Locks
  203. @vindex message-insert-canlock
  204. @cindex canlock
  205. When Message posts news messages, it inserts @code{Cancel-Lock}
  206. headers by default. This is a cryptographic header that ensures that
  207. only you can cancel your own messages, which is nice. The downside
  208. is that if you lose your @file{.emacs} file (which is where Gnus
  209. stores the secret cancel lock password (which is generated
  210. automatically the first time you use this feature)), you won't be
  211. able to cancel your message. If you want to manage a password yourself,
  212. you can put something like the following in your @file{~/.gnus.el} file:
  213. @lisp
  214. (setq canlock-password "geheimnis"
  215. canlock-password-for-verify canlock-password)
  216. @end lisp
  217. Whether to insert the header or not is controlled by the
  218. @code{message-insert-canlock} variable.
  219. Not many news servers respect the @code{Cancel-Lock} header yet, but
  220. this is expected to change in the future.
  221. @node Superseding
  222. @section Superseding
  223. @findex message-supersede
  224. The @code{message-supersede} command pops up a message buffer that will
  225. supersede the message in the current buffer.
  226. @vindex message-ignored-supersedes-headers
  227. Headers matching the @code{message-ignored-supersedes-headers} are
  228. removed before popping up the new message buffer. The default is@*
  229. @samp{^Path:\\|^Date\\|^NNTP-Posting-Host:\\|^Xref:\\|^Lines:\\|@*
  230. ^Received:\\|^X-From-Line:\\|^X-Trace:\\|^X-Complaints-To:\\|@*
  231. Return-Path:\\|^Supersedes:\\|^NNTP-Posting-Date:\\|^X-Trace:\\|@*
  232. ^X-Complaints-To:\\|^Cancel-Lock:\\|^Cancel-Key:\\|^X-Hashcash:\\|@*
  233. ^X-Payment:\\|^Approved:}.
  234. @node Forwarding
  235. @section Forwarding
  236. @findex message-forward
  237. The @code{message-forward} command pops up a message buffer to forward
  238. the message in the current buffer. If given a prefix, forward using
  239. news.
  240. @table @code
  241. @item message-forward-ignored-headers
  242. @vindex message-forward-ignored-headers
  243. In non-@code{nil}, all headers that match this regexp will be deleted
  244. when forwarding a message.
  245. @item message-forward-included-headers
  246. @vindex message-forward-included-headers
  247. In non-@code{nil}, only headers that match this regexp will be kept
  248. when forwarding a message.
  249. @item message-make-forward-subject-function
  250. @vindex message-make-forward-subject-function
  251. A list of functions that are called to generate a subject header for
  252. forwarded messages. The subject generated by the previous function is
  253. passed into each successive function.
  254. The provided functions are:
  255. @table @code
  256. @item message-forward-subject-author-subject
  257. @findex message-forward-subject-author-subject
  258. Source of article (author or newsgroup), in brackets followed by the
  259. subject.
  260. @item message-forward-subject-fwd
  261. Subject of article with @samp{Fwd:} prepended to it.
  262. @end table
  263. @item message-wash-forwarded-subjects
  264. @vindex message-wash-forwarded-subjects
  265. If this variable is @code{t}, the subjects of forwarded messages have
  266. the evidence of previous forwards (such as @samp{Fwd:}, @samp{Re:},
  267. @samp{(fwd)}) removed before the new subject is
  268. constructed. The default value is @code{nil}.
  269. @item message-forward-as-mime
  270. @vindex message-forward-as-mime
  271. If this variable is @code{t} (the default), forwarded messages are
  272. included as inline @acronym{MIME} RFC822 parts. If it's @code{nil}, forwarded
  273. messages will just be copied inline to the new message, like previous,
  274. non @acronym{MIME}-savvy versions of Gnus would do.
  275. @item message-forward-before-signature
  276. @vindex message-forward-before-signature
  277. If non-@code{nil}, put forwarded message before signature, else after.
  278. @end table
  279. @node Resending
  280. @section Resending
  281. @findex message-resend
  282. The @code{message-resend} command will prompt the user for an address
  283. and resend the message in the current buffer to that address.
  284. @vindex message-ignored-resent-headers
  285. Headers that match the @code{message-ignored-resent-headers} regexp will
  286. be removed before sending the message.
  287. @node Bouncing
  288. @section Bouncing
  289. @findex message-bounce
  290. The @code{message-bounce} command will, if the current buffer contains a
  291. bounced mail message, pop up a message buffer stripped of the bounce
  292. information. A @dfn{bounced message} is typically a mail you've sent
  293. out that has been returned by some @code{mailer-daemon} as
  294. undeliverable.
  295. @vindex message-ignored-bounced-headers
  296. Headers that match the @code{message-ignored-bounced-headers} regexp
  297. will be removed before popping up the buffer. The default is
  298. @samp{^\\(Received\\|Return-Path\\|Delivered-To\\):}.
  299. @node Mailing Lists
  300. @section Mailing Lists
  301. @cindex Mail-Followup-To
  302. Sometimes while posting to mailing lists, the poster needs to direct
  303. followups to the post to specific places. The Mail-Followup-To (MFT)
  304. was created to enable just this. Three example scenarios where this is
  305. useful:
  306. @itemize @bullet
  307. @item
  308. A mailing list poster can use MFT to express that responses should be
  309. sent to just the list, and not the poster as well. This will happen
  310. if the poster is already subscribed to the list.
  311. @item
  312. A mailing list poster can use MFT to express that responses should be
  313. sent to the list and the poster as well. This will happen if the poster
  314. is not subscribed to the list.
  315. @item
  316. If a message is posted to several mailing lists, MFT may also be used
  317. to direct the following discussion to one list only, because
  318. discussions that are spread over several lists tend to be fragmented
  319. and very difficult to follow.
  320. @end itemize
  321. Gnus honors the MFT header in other's messages (i.e., while following
  322. up to someone else's post) and also provides support for generating
  323. sensible MFT headers for outgoing messages as well.
  324. @c @menu
  325. @c * Honoring an MFT post:: What to do when one already exists
  326. @c * Composing with a MFT header:: Creating one from scratch.
  327. @c @end menu
  328. @c @node Composing with a MFT header
  329. @subsection Composing a correct MFT header automagically
  330. The first step in getting Gnus to automagically generate a MFT header
  331. in posts you make is to give Gnus a list of the mailing lists
  332. addresses you are subscribed to. You can do this in more than one
  333. way. The following variables would come in handy.
  334. @table @code
  335. @vindex message-subscribed-addresses
  336. @item message-subscribed-addresses
  337. This should be a list of addresses the user is subscribed to. Its
  338. default value is @code{nil}. Example:
  339. @lisp
  340. (setq message-subscribed-addresses
  341. '("ding@@gnus.org" "bing@@noose.org"))
  342. @end lisp
  343. @vindex message-subscribed-regexps
  344. @item message-subscribed-regexps
  345. This should be a list of regexps denoting the addresses of mailing
  346. lists subscribed to. Default value is @code{nil}. Example: If you
  347. want to achieve the same result as above:
  348. @lisp
  349. (setq message-subscribed-regexps
  350. '("\\(ding@@gnus\\)\\|\\(bing@@noose\\)\\.org")
  351. @end lisp
  352. @vindex message-subscribed-address-functions
  353. @item message-subscribed-address-functions
  354. This can be a list of functions to be called (one at a time!!) to
  355. determine the value of MFT headers. It is advisable that these
  356. functions not take any arguments. Default value is @code{nil}.
  357. There is a pre-defined function in Gnus that is a good candidate for
  358. this variable. @code{gnus-find-subscribed-addresses} is a function
  359. that returns a list of addresses corresponding to the groups that have
  360. the @code{subscribed} (@pxref{Group Parameters, ,Group Parameters,
  361. gnus, The Gnus Manual}) group parameter set to a non-@code{nil} value.
  362. This is how you would do it.
  363. @lisp
  364. (setq message-subscribed-address-functions
  365. '(gnus-find-subscribed-addresses))
  366. @end lisp
  367. @vindex message-subscribed-address-file
  368. @item message-subscribed-address-file
  369. You might be one organized human freak and have a list of addresses of
  370. all subscribed mailing lists in a separate file! Then you can just
  371. set this variable to the name of the file and life would be good.
  372. @end table
  373. You can use one or more of the above variables. All their values are
  374. ``added'' in some way that works :-)
  375. Now you are all set. Just start composing a message as you normally do.
  376. And just send it; as always. Just before the message is sent out, Gnus'
  377. MFT generation thingy kicks in and checks if the message already has a
  378. MFT field. If there is one, it is left alone. (Except if it's empty;
  379. in that case, the field is removed and is not replaced with an
  380. automatically generated one. This lets you disable MFT generation on a
  381. per-message basis.) If there is none, then the list of recipient
  382. addresses (in the To: and Cc: headers) is checked to see if one of them
  383. is a list address you are subscribed to. If none of them is a list
  384. address, then no MFT is generated; otherwise, a MFT is added to the
  385. other headers and set to the value of all addresses in To: and Cc:
  386. @kindex C-c C-f C-a
  387. @findex message-generate-unsubscribed-mail-followup-to
  388. @kindex C-c C-f C-m
  389. @findex message-goto-mail-followup-to
  390. Hm. ``So'', you ask, ``what if I send an email to a list I am not
  391. subscribed to? I want my MFT to say that I want an extra copy.'' (This
  392. is supposed to be interpreted by others the same way as if there were no
  393. MFT, but you can use an explicit MFT to override someone else's
  394. to-address group parameter.) The function
  395. @code{message-generate-unsubscribed-mail-followup-to} might come in
  396. handy. It is bound to @kbd{C-c C-f C-a} by default. In any case, you
  397. can insert a MFT of your own choice; @kbd{C-c C-f C-m}
  398. (@code{message-goto-mail-followup-to}) will help you get started.
  399. @c @node Honoring an MFT post
  400. @subsection Honoring an MFT post
  401. @vindex message-use-mail-followup-to
  402. When you followup to a post on a mailing list, and the post has a MFT
  403. header, Gnus' action will depend on the value of the variable
  404. @code{message-use-mail-followup-to}. This variable can be one of:
  405. @table @code
  406. @item use
  407. Always honor MFTs. The To: and Cc: headers in your followup will be
  408. derived from the MFT header of the original post. This is the default.
  409. @item nil
  410. Always dishonor MFTs (just ignore the darned thing)
  411. @item ask
  412. Gnus will prompt you for an action.
  413. @end table
  414. It is considered good netiquette to honor MFT, as it is assumed the
  415. fellow who posted a message knows where the followups need to go
  416. better than you do.
  417. @node Commands
  418. @chapter Commands
  419. @menu
  420. * Buffer Entry:: Commands after entering a Message buffer.
  421. * Header Commands:: Commands for moving headers or changing headers.
  422. * Movement:: Moving around in message buffers.
  423. * Insertion:: Inserting things into message buffers.
  424. * MIME:: @acronym{MIME} considerations.
  425. * IDNA:: Non-@acronym{ASCII} domain name considerations.
  426. * Security:: Signing and encrypting messages.
  427. * Various Commands:: Various things.
  428. * Sending:: Actually sending the message.
  429. * Mail Aliases:: How to use mail aliases.
  430. * Spelling:: Having Emacs check your spelling.
  431. @end menu
  432. @node Buffer Entry
  433. @section Buffer Entry
  434. @cindex undo
  435. @kindex C-_
  436. You most often end up in a Message buffer when responding to some other
  437. message of some sort. Message does lots of handling of quoted text, and
  438. may remove signatures, reformat the text, or the like---depending on
  439. which used settings you're using. Message usually gets things right,
  440. but sometimes it stumbles. To help the user unwind these stumblings,
  441. Message sets the undo boundary before each major automatic action it
  442. takes. If you press the undo key (usually located at @kbd{C-_}) a few
  443. times, you will get back the un-edited message you're responding to.
  444. @node Header Commands
  445. @section Header Commands
  446. @subsection Commands for moving to headers
  447. These following commands move to the header in question. If it doesn't
  448. exist, it will be inserted.
  449. @table @kbd
  450. @item C-c ?
  451. @kindex C-c ?
  452. @findex describe-mode
  453. Describe the message mode.
  454. @item C-c C-f C-t
  455. @kindex C-c C-f C-t
  456. @findex message-goto-to
  457. Go to the @code{To} header (@code{message-goto-to}).
  458. @item C-c C-f C-o
  459. @kindex C-c C-f C-o
  460. @findex message-goto-from
  461. Go to the @code{From} header (@code{message-goto-from}). (The ``o''
  462. in the key binding is for Originator.)
  463. @item C-c C-f C-b
  464. @kindex C-c C-f C-b
  465. @findex message-goto-bcc
  466. Go to the @code{Bcc} header (@code{message-goto-bcc}).
  467. @item C-c C-f C-w
  468. @kindex C-c C-f C-w
  469. @findex message-goto-fcc
  470. Go to the @code{Fcc} header (@code{message-goto-fcc}).
  471. @item C-c C-f C-c
  472. @kindex C-c C-f C-c
  473. @findex message-goto-cc
  474. Go to the @code{Cc} header (@code{message-goto-cc}).
  475. @item C-c C-f C-s
  476. @kindex C-c C-f C-s
  477. @findex message-goto-subject
  478. Go to the @code{Subject} header (@code{message-goto-subject}).
  479. @item C-c C-f C-r
  480. @kindex C-c C-f C-r
  481. @findex message-goto-reply-to
  482. Go to the @code{Reply-To} header (@code{message-goto-reply-to}).
  483. @item C-c C-f C-n
  484. @kindex C-c C-f C-n
  485. @findex message-goto-newsgroups
  486. Go to the @code{Newsgroups} header (@code{message-goto-newsgroups}).
  487. @item C-c C-f C-d
  488. @kindex C-c C-f C-d
  489. @findex message-goto-distribution
  490. Go to the @code{Distribution} header (@code{message-goto-distribution}).
  491. @item C-c C-f C-f
  492. @kindex C-c C-f C-f
  493. @findex message-goto-followup-to
  494. Go to the @code{Followup-To} header (@code{message-goto-followup-to}).
  495. @item C-c C-f C-k
  496. @kindex C-c C-f C-k
  497. @findex message-goto-keywords
  498. Go to the @code{Keywords} header (@code{message-goto-keywords}).
  499. @item C-c C-f C-u
  500. @kindex C-c C-f C-u
  501. @findex message-goto-summary
  502. Go to the @code{Summary} header (@code{message-goto-summary}).
  503. @item C-c C-f C-i
  504. @kindex C-c C-f C-i
  505. @findex message-insert-or-toggle-importance
  506. This inserts the @samp{Importance:} header with a value of
  507. @samp{high}. This header is used to signal the importance of the
  508. message to the receiver. If the header is already present in the
  509. buffer, it cycles between the three valid values according to RFC
  510. 1376: @samp{low}, @samp{normal} and @samp{high}.
  511. @item C-c C-f C-a
  512. @kindex C-c C-f C-a
  513. @findex message-generate-unsubscribed-mail-followup-to
  514. Insert a reasonable @samp{Mail-Followup-To:} header
  515. (@pxref{Mailing Lists}) in a post to an
  516. unsubscribed list. When making original posts to a mailing list you are
  517. not subscribed to, you have to type in a @samp{Mail-Followup-To:} header
  518. by hand. The contents, usually, are the addresses of the list and your
  519. own address. This function inserts such a header automatically. It
  520. fetches the contents of the @samp{To:} header in the current mail
  521. buffer, and appends the current @code{user-mail-address}.
  522. If the optional argument @code{include-cc} is non-@code{nil}, the
  523. addresses in the @samp{Cc:} header are also put into the
  524. @samp{Mail-Followup-To:} header.
  525. @end table
  526. @subsection Commands to change headers
  527. @table @kbd
  528. @item C-c C-o
  529. @kindex C-c C-o
  530. @findex message-sort-headers
  531. @vindex message-header-format-alist
  532. Sort headers according to @code{message-header-format-alist}
  533. (@code{message-sort-headers}).
  534. @item C-c C-t
  535. @kindex C-c C-t
  536. @findex message-insert-to
  537. Insert a @code{To} header that contains the @code{Reply-To} or
  538. @code{From} header of the message you're following up
  539. (@code{message-insert-to}).
  540. @item C-c C-n
  541. @kindex C-c C-n
  542. @findex message-insert-newsgroups
  543. Insert a @code{Newsgroups} header that reflects the @code{Followup-To}
  544. or @code{Newsgroups} header of the article you're replying to
  545. (@code{message-insert-newsgroups}).
  546. @item C-c C-l
  547. @kindex C-c C-l
  548. @findex message-to-list-only
  549. Send a message to the list only. Remove all addresses but the list
  550. address from @code{To:} and @code{Cc:} headers.
  551. @item C-c M-n
  552. @kindex C-c M-n
  553. @findex message-insert-disposition-notification-to
  554. Insert a request for a disposition
  555. notification. (@code{message-insert-disposition-notification-to}).
  556. This means that if the recipient supports RFC 2298 she might send you a
  557. notification that she received the message.
  558. @item M-x message-insert-importance-high
  559. @kindex M-x message-insert-importance-high
  560. @findex message-insert-importance-high
  561. @cindex Importance
  562. Insert an @samp{Importance} header with a value of @samp{high},
  563. deleting headers if necessary.
  564. @item M-x message-insert-importance-low
  565. @kindex M-x message-insert-importance-low
  566. @findex message-insert-importance-low
  567. @cindex Importance
  568. Insert an @samp{Importance} header with a value of @samp{low}, deleting
  569. headers if necessary.
  570. @item C-c C-f s
  571. @kindex C-c C-f s
  572. @findex message-change-subject
  573. @cindex Subject
  574. Change the current @samp{Subject} header. Ask for new @samp{Subject}
  575. header and append @samp{(was: <Old Subject>)}. The old subject can be
  576. stripped on replying, see @code{message-subject-trailing-was-query}
  577. (@pxref{Message Headers}).
  578. @item C-c C-f x
  579. @kindex C-c C-f x
  580. @findex message-cross-post-followup-to
  581. @vindex message-cross-post-default
  582. @vindex message-cross-post-note-function
  583. @cindex X-Post
  584. @cindex cross-post
  585. Set up the @samp{FollowUp-To} header with a target newsgroup for a
  586. cross-post, add that target newsgroup to the @samp{Newsgroups} header if
  587. it is not a member of @samp{Newsgroups}, and insert a note in the body.
  588. If @code{message-cross-post-default} is @code{nil} or if this command is
  589. called with a prefix-argument, only the @samp{FollowUp-To} header will
  590. be set but the target newsgroup will not be added to the
  591. @samp{Newsgroups} header. The function to insert a note is controlled
  592. by the @code{message-cross-post-note-function} variable.
  593. @item C-c C-f t
  594. @kindex C-c C-f t
  595. @findex message-reduce-to-to-cc
  596. Replace contents of @samp{To} header with contents of @samp{Cc}
  597. header (or the @samp{Bcc} header, if there is no @samp{Cc} header).
  598. @item C-c C-f w
  599. @kindex C-c C-f w
  600. @findex message-insert-wide-reply
  601. Insert @samp{To} and @samp{Cc} headers as if you were doing a wide
  602. reply even if the message was not made for a wide reply first.
  603. @item C-c C-f a
  604. @kindex C-c C-f a
  605. @findex message-add-archive-header
  606. @vindex message-archive-header
  607. @vindex message-archive-note
  608. @cindex X-No-Archive
  609. Insert @samp{X-No-Archive: Yes} in the header and a note in the body.
  610. The header and the note can be customized using
  611. @code{message-archive-header} and @code{message-archive-note}. When
  612. called with a prefix argument, ask for a text to insert. If you don't
  613. want the note in the body, set @code{message-archive-note} to
  614. @code{nil}.
  615. @end table
  616. @node Movement
  617. @section Movement
  618. @table @kbd
  619. @item C-c C-b
  620. @kindex C-c C-b
  621. @findex message-goto-body
  622. Move to the beginning of the body of the message
  623. (@code{message-goto-body}).
  624. @item C-c C-i
  625. @kindex C-c C-i
  626. @findex message-goto-signature
  627. Move to the signature of the message (@code{message-goto-signature}).
  628. @item C-a
  629. @kindex C-a
  630. @findex message-beginning-of-line
  631. @vindex message-beginning-of-line
  632. If at beginning of header value, go to beginning of line, else go to
  633. beginning of header value. (The header value comes after the header
  634. name and the colon.) This behavior can be disabled by toggling
  635. the variable @code{message-beginning-of-line}.
  636. @end table
  637. @node Insertion
  638. @section Insertion
  639. @table @kbd
  640. @item C-c C-y
  641. @kindex C-c C-y
  642. @findex message-yank-original
  643. Yank the message that's being replied to into the message buffer
  644. (@code{message-yank-original}).
  645. @item C-c C-M-y
  646. @kindex C-c C-M-y
  647. @findex message-yank-buffer
  648. Prompt for a buffer name and yank the contents of that buffer into the
  649. message buffer (@code{message-yank-buffer}).
  650. @item C-c C-q
  651. @kindex C-c C-q
  652. @findex message-fill-yanked-message
  653. Fill the yanked message (@code{message-fill-yanked-message}). Warning:
  654. Can severely mess up the yanked text if its quoting conventions are
  655. strange. You'll quickly get a feel for when it's safe, though. Anyway,
  656. just remember that @kbd{C-x u} (@code{undo}) is available and you'll be
  657. all right.
  658. @item C-c C-w
  659. @kindex C-c C-w
  660. @findex message-insert-signature
  661. Insert a signature at the end of the buffer
  662. (@code{message-insert-signature}).
  663. @item C-c M-h
  664. @kindex C-c M-h
  665. @findex message-insert-headers
  666. Insert the message headers (@code{message-insert-headers}).
  667. @item C-c M-m
  668. @kindex C-c M-m
  669. @findex message-mark-inserted-region
  670. Mark some region in the current article with enclosing tags. See
  671. @code{message-mark-insert-begin} and @code{message-mark-insert-end}.
  672. When called with a prefix argument, use slrn style verbatim marks
  673. (@samp{#v+} and @samp{#v-}).
  674. @item C-c M-f
  675. @kindex C-c M-f
  676. @findex message-mark-insert-file
  677. Insert a file in the current article with enclosing tags.
  678. See @code{message-mark-insert-begin} and @code{message-mark-insert-end}.
  679. When called with a prefix argument, use slrn style verbatim marks
  680. (@samp{#v+} and @samp{#v-}).
  681. @end table
  682. @node MIME
  683. @section MIME
  684. @cindex MML
  685. @cindex MIME
  686. @cindex multipart
  687. @cindex attachment
  688. Message is a @acronym{MIME}-compliant posting agent. The user generally
  689. doesn't have to do anything to make the @acronym{MIME} happen---Message will
  690. automatically add the @code{Content-Type} and
  691. @code{Content-Transfer-Encoding} headers.
  692. @findex mml-attach-file
  693. @kindex C-c C-a
  694. The most typical thing users want to use the multipart things in
  695. @acronym{MIME} for is to add ``attachments'' to mail they send out.
  696. This can be done with the @kbd{C-c C-a} command (@kbd{M-x mml-attach-file}),
  697. which will prompt for a file name and a @acronym{MIME} type.
  698. @vindex mml-dnd-protocol-alist
  699. @vindex mml-dnd-attach-options
  700. If your Emacs supports drag and drop, you can also drop the file in the
  701. Message buffer. The variable @code{mml-dnd-protocol-alist} specifies
  702. what kind of action is done when you drop a file into the Message
  703. buffer. The variable @code{mml-dnd-attach-options} controls which
  704. @acronym{MIME} options you want to specify when dropping a file. If it
  705. is a list, valid members are @code{type}, @code{description} and
  706. @code{disposition}. @code{disposition} implies @code{type}. If it is
  707. @code{nil}, don't ask for options. If it is @code{t}, ask the user
  708. whether or not to specify options.
  709. You can also create arbitrarily complex multiparts using the @acronym{MML}
  710. language (@pxref{Composing, , Composing, emacs-mime, The Emacs MIME
  711. Manual}).
  712. @node IDNA
  713. @section IDNA
  714. @cindex IDNA
  715. @cindex internationalized domain names
  716. @cindex non-ascii domain names
  717. @acronym{IDNA} is a standard way to encode non-@acronym{ASCII} domain
  718. names into a readable @acronym{ASCII} string. The details can be
  719. found in RFC 3490.
  720. Message is a @acronym{IDNA}-compliant posting agent. The user
  721. generally doesn't have to do anything to make the @acronym{IDNA}
  722. happen---Message will encode non-@acronym{ASCII} domain names in @code{From},
  723. @code{To}, and @code{Cc} headers automatically.
  724. Until @acronym{IDNA} becomes more well known, Message queries you
  725. whether @acronym{IDNA} encoding of the domain name really should
  726. occur. Some users might not be aware that domain names can contain
  727. non-@acronym{ASCII} now, so this gives them a safety net if they accidentally
  728. typed a non-@acronym{ASCII} domain name.
  729. @vindex message-use-idna
  730. The @code{message-use-idna} variable control whether @acronym{IDNA} is
  731. used. If the variable is @code{nil} no @acronym{IDNA} encoding will
  732. ever happen, if it is set to the symbol @code{ask} the user will be
  733. queried, and if set to @code{t} (which is the default if @acronym{IDNA}
  734. is fully available) @acronym{IDNA} encoding happens automatically.
  735. @findex message-idna-to-ascii-rhs
  736. If you want to experiment with the @acronym{IDNA} encoding, you can
  737. invoke @kbd{M-x message-idna-to-ascii-rhs RET} in the message buffer
  738. to have the non-@acronym{ASCII} domain names encoded while you edit
  739. the message.
  740. Note that you must have @uref{http://www.gnu.org/software/libidn/, GNU
  741. Libidn} installed in order to use this functionality.
  742. @node Security
  743. @section Security
  744. @cindex Security
  745. @cindex S/MIME
  746. @cindex PGP
  747. @cindex PGP/MIME
  748. @cindex sign
  749. @cindex encrypt
  750. @cindex secure
  751. Using the @acronym{MML} language, Message is able to create digitally
  752. signed and digitally encrypted messages. Message (or rather
  753. @acronym{MML}) currently support @acronym{PGP} (RFC 1991),
  754. @acronym{PGP/MIME} (RFC 2015/3156) and @acronym{S/MIME}.
  755. @menu
  756. * Signing and encryption:: Signing and encrypting commands.
  757. * Using S/MIME:: Using S/MIME
  758. * Using PGP/MIME:: Using PGP/MIME
  759. * PGP Compatibility:: Compatibility with older implementations
  760. @end menu
  761. @node Signing and encryption
  762. @subsection Signing and encrypting commands
  763. Instructing @acronym{MML} to perform security operations on a
  764. @acronym{MIME} part is done using the @kbd{C-c C-m s} key map for
  765. signing and the @kbd{C-c C-m c} key map for encryption, as follows.
  766. @table @kbd
  767. @item C-c C-m s s
  768. @kindex C-c C-m s s
  769. @findex mml-secure-message-sign-smime
  770. Digitally sign current message using @acronym{S/MIME}.
  771. @item C-c C-m s o
  772. @kindex C-c C-m s o
  773. @findex mml-secure-message-sign-pgp
  774. Digitally sign current message using @acronym{PGP}.
  775. @item C-c C-m s p
  776. @kindex C-c C-m s p
  777. @findex mml-secure-message-sign-pgpmime
  778. Digitally sign current message using @acronym{PGP/MIME}.
  779. @item C-c C-m c s
  780. @kindex C-c C-m c s
  781. @findex mml-secure-message-encrypt-smime
  782. Digitally encrypt current message using @acronym{S/MIME}.
  783. @item C-c C-m c o
  784. @kindex C-c C-m c o
  785. @findex mml-secure-message-encrypt-pgp
  786. Digitally encrypt current message using @acronym{PGP}.
  787. @item C-c C-m c p
  788. @kindex C-c C-m c p
  789. @findex mml-secure-message-encrypt-pgpmime
  790. Digitally encrypt current message using @acronym{PGP/MIME}.
  791. @item C-c C-m C-n
  792. @kindex C-c C-m C-n
  793. @findex mml-unsecure-message
  794. Remove security related @acronym{MML} tags from message.
  795. @end table
  796. These commands do not immediately sign or encrypt the message, they
  797. merely insert the proper @acronym{MML} secure tag to instruct the
  798. @acronym{MML} engine to perform that operation when the message is
  799. actually sent. They may perform other operations too, such as locating
  800. and retrieving a @acronym{S/MIME} certificate of the person you wish to
  801. send encrypted mail to. When the mml parsing engine converts your
  802. @acronym{MML} into a properly encoded @acronym{MIME} message, the secure
  803. tag will be replaced with either a part or a multipart tag. If your
  804. message contains other mml parts, a multipart tag will be used; if no
  805. other parts are present in your message a single part tag will be used.
  806. This way, message mode will do the Right Thing (TM) with
  807. signed/encrypted multipart messages.
  808. Since signing and especially encryption often is used when sensitive
  809. information is sent, you may want to have some way to ensure that your
  810. mail is actually signed or encrypted. After invoking the above
  811. sign/encrypt commands, it is possible to preview the raw article by
  812. using @kbd{C-u C-c RET P} (@code{mml-preview}). Then you can
  813. verify that your long rant about what your ex-significant other or
  814. whomever actually did with that funny looking person at that strange
  815. party the other night, actually will be sent encrypted.
  816. @emph{Note!} Neither @acronym{PGP/MIME} nor @acronym{S/MIME} encrypt/signs
  817. RFC822 headers. They only operate on the @acronym{MIME} object. Keep this
  818. in mind before sending mail with a sensitive Subject line.
  819. By default, when encrypting a message, Gnus will use the
  820. ``signencrypt'' mode, which means the message is both signed and
  821. encrypted. If you would like to disable this for a particular
  822. message, give the @code{mml-secure-message-encrypt-*} command a prefix
  823. argument, e.g., @kbd{C-u C-c C-m c p}.
  824. Actually using the security commands above is not very difficult. At
  825. least not compared with making sure all involved programs talk with each
  826. other properly. Thus, we now describe what external libraries or
  827. programs are required to make things work, and some small general hints.
  828. @node Using S/MIME
  829. @subsection Using S/MIME
  830. @emph{Note!} This section assume you have a basic familiarity with
  831. modern cryptography, @acronym{S/MIME}, various PKCS standards, OpenSSL and
  832. so on.
  833. The @acronym{S/MIME} support in Message (and @acronym{MML}) require
  834. OpenSSL@. OpenSSL performs the actual @acronym{S/MIME} sign/encrypt
  835. operations. OpenSSL can be found at @uref{http://www.openssl.org/}.
  836. OpenSSL 0.9.6 and later should work. Version 0.9.5a cannot extract mail
  837. addresses from certificates, and it insert a spurious CR character into
  838. @acronym{MIME} separators so you may wish to avoid it if you would like
  839. to avoid being regarded as someone who send strange mail. (Although by
  840. sending @acronym{S/MIME} messages you've probably already lost that
  841. contest.)
  842. To be able to send encrypted mail, a personal certificate is not
  843. required. Message (@acronym{MML}) need a certificate for the person to whom you
  844. wish to communicate with though. You're asked for this when you type
  845. @kbd{C-c C-m c s}. Currently there are two ways to retrieve this
  846. certificate, from a local file or from DNS@. If you chose a local
  847. file, it need to contain a X.509 certificate in @acronym{PEM} format.
  848. If you chose DNS, you're asked for the domain name where the
  849. certificate is stored, the default is a good guess. To my belief,
  850. Message (@acronym{MML}) is the first mail agent in the world to support
  851. retrieving @acronym{S/MIME} certificates from DNS, so you're not
  852. likely to find very many certificates out there. At least there
  853. should be one, stored at the domain @code{simon.josefsson.org}. LDAP
  854. is a more popular method of distributing certificates, support for it
  855. is planned. (Meanwhile, you can use @code{ldapsearch} from the
  856. command line to retrieve a certificate into a file and use it.)
  857. As for signing messages, OpenSSL can't perform signing operations
  858. without some kind of configuration. Especially, you need to tell it
  859. where your private key and your certificate is stored. @acronym{MML}
  860. uses an Emacs interface to OpenSSL, aptly named @code{smime.el}, and it
  861. contain a @code{custom} group used for this configuration. So, try
  862. @kbd{M-x customize-group RET smime RET} and look around.
  863. Currently there is no support for talking to a CA (or RA) to create
  864. your own certificate. None is planned either. You need to do this
  865. manually with OpenSSL or using some other program. I used Netscape
  866. and got a free @acronym{S/MIME} certificate from one of the big CA's on the
  867. net. Netscape is able to export your private key and certificate in
  868. PKCS #12 format. Use OpenSSL to convert this into a plain X.509
  869. certificate in PEM format as follows.
  870. @example
  871. $ openssl pkcs12 -in ns.p12 -clcerts -nodes > key+cert.pem
  872. @end example
  873. The @file{key+cert.pem} file should be pointed to from the
  874. @code{smime-keys} variable. You should now be able to send signed mail.
  875. @emph{Note!} Your private key is now stored unencrypted in the file,
  876. so take care in handling it. Storing encrypted keys on the disk are
  877. supported, and Gnus will ask you for a passphrase before invoking
  878. OpenSSL@. Read the OpenSSL documentation for how to achieve this. If
  879. you use unencrypted keys (e.g., if they are on a secure storage, or if
  880. you are on a secure single user machine) simply press @code{RET} at
  881. the passphrase prompt.
  882. @node Using PGP/MIME
  883. @subsection Using PGP/MIME
  884. @acronym{PGP/MIME} requires an external OpenPGP implementation, such
  885. as @uref{http://www.gnupg.org/, GNU Privacy Guard}. Pre-OpenPGP
  886. implementations such as PGP 2.x and PGP 5.x are also supported. The
  887. default Emacs interface to the PGP implementation is EasyPG
  888. (@pxref{Top,,EasyPG Assistant User's Manual, epa, EasyPG Assistant
  889. User's Manual}), but PGG (@pxref{Top, ,PGG, pgg, PGG Manual}) and
  890. Mailcrypt are also supported. @xref{PGP Compatibility}.
  891. @cindex gpg-agent
  892. Message internally calls GnuPG (the @command{gpg} command) to perform
  893. data encryption, and in certain cases (decrypting or signing for
  894. example), @command{gpg} requires user's passphrase. Currently the
  895. recommended way to supply your passphrase to @command{gpg} is to use the
  896. @command{gpg-agent} program.
  897. To use @command{gpg-agent} in Emacs, you need to run the following
  898. command from the shell before starting Emacs.
  899. @example
  900. eval `gpg-agent --daemon`
  901. @end example
  902. This will invoke @command{gpg-agent} and set the environment variable
  903. @code{GPG_AGENT_INFO} to allow @command{gpg} to communicate with it.
  904. It might be good idea to put this command in your @file{.xsession} or
  905. @file{.bash_profile}. @xref{Invoking GPG-AGENT, , , gnupg, Using the
  906. GNU Privacy Guard}.
  907. Once your @command{gpg-agent} is set up, it will ask you for a
  908. passphrase as needed for @command{gpg}. Under the X Window System,
  909. you will see a new passphrase input dialog appear. The dialog is
  910. provided by PIN Entry (the @command{pinentry} command), and as of
  911. version 0.7.2, @command{pinentry} cannot cooperate with Emacs on a
  912. single tty. So, if you are using a text console, you may need to put
  913. a passphrase into gpg-agent's cache beforehand. The following command
  914. does the trick.
  915. @example
  916. gpg --use-agent --sign < /dev/null > /dev/null
  917. @end example
  918. @node PGP Compatibility
  919. @subsection Compatibility with older implementations
  920. @vindex gpg-temp-directory
  921. Note, if you are using the @code{gpg.el} you must make sure that the
  922. directory specified by @code{gpg-temp-directory} have permissions
  923. 0700.
  924. Creating your own key is described in detail in the documentation of
  925. your PGP implementation, so we refer to it.
  926. If you have imported your old PGP 2.x key into GnuPG, and want to send
  927. signed and encrypted messages to your fellow PGP 2.x users, you'll
  928. discover that the receiver cannot understand what you send. One
  929. solution is to use PGP 2.x instead (e.g., if you use @code{pgg}, set
  930. @code{pgg-default-scheme} to @code{pgp}). You could also convince your
  931. fellow PGP 2.x users to convert to GnuPG@.
  932. @vindex mml-signencrypt-style-alist
  933. As a final workaround, you can make the sign and encryption work in
  934. two steps; separately sign, then encrypt a message. If you would like
  935. to change this behavior you can customize the
  936. @code{mml-signencrypt-style-alist} variable. For example:
  937. @lisp
  938. (setq mml-signencrypt-style-alist '(("smime" separate)
  939. ("pgp" separate)
  940. ("pgpauto" separate)
  941. ("pgpmime" separate)))
  942. @end lisp
  943. This causes to sign and encrypt in two passes, thus generating a
  944. message that can be understood by PGP version 2.
  945. (Refer to @uref{http://www.gnupg.org/gph/en/pgp2x.html} for more
  946. information about the problem.)
  947. @node Various Commands
  948. @section Various Commands
  949. @table @kbd
  950. @item C-c C-r
  951. @kindex C-c C-r
  952. @findex message-caesar-buffer-body
  953. Caesar rotate (aka. rot13) the current message
  954. (@code{message-caesar-buffer-body}). If narrowing is in effect, just
  955. rotate the visible portion of the buffer. A numerical prefix says how
  956. many places to rotate the text. The default is 13.
  957. @item C-c C-e
  958. @kindex C-c C-e
  959. @findex message-elide-region
  960. @vindex message-elide-ellipsis
  961. Elide the text between point and mark (@code{message-elide-region}).
  962. The text is killed and replaced with the contents of the variable
  963. @code{message-elide-ellipsis}. The default value is to use an ellipsis
  964. (@samp{[...]}).
  965. This is a format-spec string, and you can use @samp{%l} to say how
  966. many lines were removed, and @samp{%c} to say how many characters were
  967. removed.
  968. @item C-c M-k
  969. @kindex C-c M-k
  970. @findex message-kill-address
  971. Kill the address under point.
  972. @item C-c C-z
  973. @kindex C-c C-z
  974. @findex message-kill-to-signature
  975. Kill all the text up to the signature, or if that's missing, up to the
  976. end of the message (@code{message-kill-to-signature}).
  977. @item C-c C-v
  978. @kindex C-c C-v
  979. @findex message-delete-not-region
  980. Delete all text in the body of the message that is outside the region
  981. (@code{message-delete-not-region}).
  982. @item M-RET
  983. @kindex M-RET
  984. @findex message-newline-and-reformat
  985. Insert four newlines, and then reformat if inside quoted text.
  986. Here's an example:
  987. @example
  988. > This is some quoted text. And here's more quoted text.
  989. @end example
  990. If point is before @samp{And} and you press @kbd{M-RET}, you'll get:
  991. @example
  992. > This is some quoted text.
  993. *
  994. > And here's more quoted text.
  995. @end example
  996. @samp{*} says where point will be placed.
  997. @item C-c M-r
  998. @kindex C-c M-r
  999. @findex message-rename-buffer
  1000. Rename the buffer (@code{message-rename-buffer}). If given a prefix,
  1001. prompt for a new buffer name.
  1002. @item TAB
  1003. @kindex TAB
  1004. @findex message-tab
  1005. @vindex message-tab-body-function
  1006. If @code{message-tab-body-function} is non-@code{nil}, execute the
  1007. function it specifies. Otherwise use the function bound to @kbd{TAB} in
  1008. @code{text-mode-map} or @code{global-map}.
  1009. @end table
  1010. @node Sending
  1011. @section Sending
  1012. @table @kbd
  1013. @item C-c C-c
  1014. @kindex C-c C-c
  1015. @findex message-send-and-exit
  1016. Send the message and bury the current buffer
  1017. (@code{message-send-and-exit}).
  1018. @item C-c C-s
  1019. @kindex C-c C-s
  1020. @findex message-send
  1021. Send the message (@code{message-send}).
  1022. @item C-c C-d
  1023. @kindex C-c C-d
  1024. @findex message-dont-send
  1025. Bury the message buffer and exit (@code{message-dont-send}).
  1026. @item C-c C-k
  1027. @kindex C-c C-k
  1028. @findex message-kill-buffer
  1029. Kill the message buffer and exit (@code{message-kill-buffer}).
  1030. @end table
  1031. @node Mail Aliases
  1032. @section Mail Aliases
  1033. @cindex mail aliases
  1034. @cindex aliases
  1035. @cindex completion
  1036. @cindex ecomplete
  1037. @vindex message-mail-alias-type
  1038. The @code{message-mail-alias-type} variable controls what type of mail
  1039. alias expansion to use. Currently two forms are supported:
  1040. @code{mailabbrev} and @code{ecomplete}. If this variable is
  1041. @code{nil}, no mail alias expansion will be performed.
  1042. @code{mailabbrev} works by parsing the @file{/etc/mailrc} and
  1043. @file{~/.mailrc} files. These files look like:
  1044. @example
  1045. alias lmi "Lars Magne Ingebrigtsen <larsi@@ifi.uio.no>"
  1046. alias ding "ding@@ifi.uio.no (ding mailing list)"
  1047. @end example
  1048. After adding lines like this to your @file{~/.mailrc} file, you should
  1049. be able to just write @samp{lmi} in the @code{To} or @code{Cc} (and so
  1050. on) headers and press @kbd{SPC} to expand the alias.
  1051. No expansion will be performed upon sending of the message---all
  1052. expansions have to be done explicitly.
  1053. If you're using @code{ecomplete}, all addresses from @code{To} and
  1054. @code{Cc} headers will automatically be put into the
  1055. @file{~/.ecompleterc} file. When you enter text in the @code{To} and
  1056. @code{Cc} headers, @code{ecomplete} will check out the values stored
  1057. there and ``electrically'' say what completions are possible. To
  1058. choose one of these completions, use the @kbd{M-n} command to move
  1059. down to the list. Use @kbd{M-n} and @kbd{M-p} to move down and up the
  1060. list, and @kbd{RET} to choose a completion.
  1061. @node Spelling
  1062. @section Spelling
  1063. @cindex spelling
  1064. @findex ispell-message
  1065. There are two popular ways to have Emacs spell-check your messages:
  1066. @code{ispell} and @code{flyspell}. @code{ispell} is the older and
  1067. probably more popular package. You typically first write the message,
  1068. and then run the entire thing through @code{ispell} and fix all the
  1069. typos. To have this happen automatically when you send a message, put
  1070. something like the following in your @file{.emacs} file:
  1071. @lisp
  1072. (add-hook 'message-send-hook 'ispell-message)
  1073. @end lisp
  1074. @vindex ispell-message-dictionary-alist
  1075. If you're in the habit of writing in different languages, this can be
  1076. controlled by the @code{ispell-message-dictionary-alist} variable:
  1077. @lisp
  1078. (setq ispell-message-dictionary-alist
  1079. '(("^Newsgroups:.*\\bde\\." . "deutsch8")
  1080. (".*" . "default")))
  1081. @end lisp
  1082. @code{ispell} depends on having the external @samp{ispell} command
  1083. installed.
  1084. The other popular method is using @code{flyspell}. This package checks
  1085. your spelling while you're writing, and marks any mis-spelled words in
  1086. various ways.
  1087. To use @code{flyspell}, put something like the following in your
  1088. @file{.emacs} file:
  1089. @lisp
  1090. (defun my-message-setup-routine ()
  1091. (flyspell-mode 1))
  1092. (add-hook 'message-setup-hook 'my-message-setup-routine)
  1093. @end lisp
  1094. @code{flyspell} depends on having the external @samp{ispell} command
  1095. installed.
  1096. @node Variables
  1097. @chapter Variables
  1098. @menu
  1099. * Message Headers:: General message header stuff.
  1100. * Mail Headers:: Customizing mail headers.
  1101. * Mail Variables:: Other mail variables.
  1102. * News Headers:: Customizing news headers.
  1103. * News Variables:: Other news variables.
  1104. * Insertion Variables:: Customizing how things are inserted.
  1105. * Various Message Variables:: Other message variables.
  1106. * Sending Variables:: Variables for sending.
  1107. * Message Buffers:: How Message names its buffers.
  1108. * Message Actions:: Actions to be performed when exiting.
  1109. @end menu
  1110. @node Message Headers
  1111. @section Message Headers
  1112. Message is quite aggressive on the message generation front. It has to
  1113. be---it's a combined news and mail agent. To be able to send combined
  1114. messages, it has to generate all headers itself (instead of letting the
  1115. mail/news system do it) to ensure that mail and news copies of messages
  1116. look sufficiently similar.
  1117. @table @code
  1118. @item message-generate-headers-first
  1119. @vindex message-generate-headers-first
  1120. If @code{t}, generate all required headers before starting to
  1121. compose the message. This can also be a list of headers to generate:
  1122. @lisp
  1123. (setq message-generate-headers-first
  1124. '(References))
  1125. @end lisp
  1126. @vindex message-required-headers
  1127. The variables @code{message-required-headers},
  1128. @code{message-required-mail-headers} and
  1129. @code{message-required-news-headers} specify which headers are
  1130. required.
  1131. Note that some headers will be removed and re-generated before posting,
  1132. because of the variable @code{message-deletable-headers} (see below).
  1133. @item message-draft-headers
  1134. @vindex message-draft-headers
  1135. When running Message from Gnus, the message buffers are associated
  1136. with a draft group. @code{message-draft-headers} says which headers
  1137. should be generated when a draft is written to the draft group.
  1138. @item message-from-style
  1139. @vindex message-from-style
  1140. Specifies how @code{From} headers should look. There are four valid
  1141. values:
  1142. @table @code
  1143. @item nil
  1144. Just the address---@samp{king@@grassland.com}.
  1145. @item parens
  1146. @samp{king@@grassland.com (Elvis Parsley)}.
  1147. @item angles
  1148. @samp{Elvis Parsley <king@@grassland.com>}.
  1149. @item default
  1150. Look like @code{angles} if that doesn't require quoting, and
  1151. @code{parens} if it does. If even @code{parens} requires quoting, use
  1152. @code{angles} anyway.
  1153. @end table
  1154. @item message-deletable-headers
  1155. @vindex message-deletable-headers
  1156. Headers in this list that were previously generated by Message will be
  1157. deleted before posting. Let's say you post an article. Then you decide
  1158. to post it again to some other group, you naughty boy, so you jump back
  1159. to the @file{*post-buf*} buffer, edit the @code{Newsgroups} line, and
  1160. ship it off again. By default, this variable makes sure that the old
  1161. generated @code{Message-ID} is deleted, and a new one generated. If
  1162. this isn't done, the entire empire would probably crumble, anarchy would
  1163. prevail, and cats would start walking on two legs and rule the world.
  1164. Allegedly.
  1165. @item message-default-headers
  1166. @vindex message-default-headers
  1167. Header lines to be inserted in outgoing messages before you edit the
  1168. message, so you can edit or delete their lines. If set to a string, it
  1169. is directly inserted. If set to a function, it is called and its
  1170. result is inserted.
  1171. @item message-subject-re-regexp
  1172. @vindex message-subject-re-regexp
  1173. @cindex Aw
  1174. @cindex Sv
  1175. @cindex Re
  1176. Responses to messages have subjects that start with @samp{Re: }. This
  1177. is @emph{not} an abbreviation of the English word ``response'', but is
  1178. Latin, and means ``in response to''. Some illiterate nincompoops have
  1179. failed to grasp this fact, and have ``internationalized'' their software
  1180. to use abominations like @samp{Aw: } (``antwort'') or @samp{Sv: }
  1181. (``svar'') instead, which is meaningless and evil. However, you may
  1182. have to deal with users that use these evil tools, in which case you may
  1183. set this variable to a regexp that matches these prefixes. Myself, I
  1184. just throw away non-compliant mail.
  1185. Here's an example of a value to deal with these headers when
  1186. responding to a message:
  1187. @lisp
  1188. (setq message-subject-re-regexp
  1189. (concat
  1190. "^[ \t]*"
  1191. "\\("
  1192. "\\("
  1193. "[Aa][Nn][Tt][Ww]\\.?\\|" ; antw
  1194. "[Aa][Ww]\\|" ; aw
  1195. "[Ff][Ww][Dd]?\\|" ; fwd
  1196. "[Oo][Dd][Pp]\\|" ; odp
  1197. "[Rr][Ee]\\|" ; re
  1198. "[Rr][\311\351][Ff]\\.?\\|" ; ref
  1199. "[Ss][Vv]" ; sv
  1200. "\\)"
  1201. "\\(\\[[0-9]*\\]\\)"
  1202. "*:[ \t]*"
  1203. "\\)"
  1204. "*[ \t]*"
  1205. ))
  1206. @end lisp
  1207. @item message-subject-trailing-was-query
  1208. @vindex message-subject-trailing-was-query
  1209. @vindex message-subject-trailing-was-ask-regexp
  1210. @vindex message-subject-trailing-was-regexp
  1211. Controls what to do with trailing @samp{(was: <old subject>)} in subject
  1212. lines. If @code{nil}, leave the subject unchanged. If it is the symbol
  1213. @code{ask}, query the user what to do. In this case, the subject is
  1214. matched against @code{message-subject-trailing-was-ask-regexp}. If
  1215. @code{message-subject-trailing-was-query} is @code{t}, always strip the
  1216. trailing old subject. In this case,
  1217. @code{message-subject-trailing-was-regexp} is used.
  1218. @item message-alternative-emails
  1219. @vindex message-alternative-emails
  1220. Regexp matching alternative email addresses. The first address in the
  1221. To, Cc or From headers of the original article matching this variable is
  1222. used as the From field of outgoing messages, replacing the default From
  1223. value.
  1224. For example, if you have two secondary email addresses john@@home.net
  1225. and john.doe@@work.com and want to use them in the From field when
  1226. composing a reply to a message addressed to one of them, you could set
  1227. this variable like this:
  1228. @lisp
  1229. (setq message-alternative-emails
  1230. (regexp-opt '("john@@home.net" "john.doe@@work.com")))
  1231. @end lisp
  1232. This variable has precedence over posting styles and anything that runs
  1233. off @code{message-setup-hook}.
  1234. @item message-allow-no-recipients
  1235. @vindex message-allow-no-recipients
  1236. Specifies what to do when there are no recipients other than
  1237. @code{Gcc} or @code{Fcc}. If it is @code{always}, the posting is
  1238. allowed. If it is @code{never}, the posting is not allowed. If it is
  1239. @code{ask} (the default), you are prompted.
  1240. @item message-hidden-headers
  1241. @vindex message-hidden-headers
  1242. A regexp, a list of regexps, or a list where the first element is
  1243. @code{not} and the rest are regexps. It says which headers to keep
  1244. hidden when composing a message.
  1245. @lisp
  1246. (setq message-hidden-headers
  1247. '(not "From" "Subject" "To" "Cc" "Newsgroups"))
  1248. @end lisp
  1249. Headers are hidden using narrowing, you can use @kbd{M-x widen} to
  1250. expose them in the buffer.
  1251. @item message-header-synonyms
  1252. @vindex message-header-synonyms
  1253. A list of lists of header synonyms. E.g., if this list contains a
  1254. member list with elements @code{Cc} and @code{To}, then
  1255. @code{message-carefully-insert-headers} will not insert a @code{To}
  1256. header when the message is already @code{Cc}ed to the recipient.
  1257. @end table
  1258. @node Mail Headers
  1259. @section Mail Headers
  1260. @table @code
  1261. @item message-required-mail-headers
  1262. @vindex message-required-mail-headers
  1263. @xref{News Headers}, for the syntax of this variable. It is
  1264. @code{(From Subject Date (optional . In-Reply-To) Message-ID
  1265. (optional . User-Agent))} by default.
  1266. @item message-ignored-mail-headers
  1267. @vindex message-ignored-mail-headers
  1268. Regexp of headers to be removed before mailing. The default is@*
  1269. @samp{^[GF]cc:\\|^Resent-Fcc:\\|^Xref:\\|^X-Draft-From:\\|@*
  1270. ^X-Gnus-Agent-Meta-Information:}.
  1271. @item message-default-mail-headers
  1272. @vindex message-default-mail-headers
  1273. This string is inserted at the end of the headers in all message
  1274. buffers that are initialized as mail.
  1275. @item message-generate-hashcash
  1276. @vindex message-generate-hashcash
  1277. Variable that indicates whether @samp{X-Hashcash} headers
  1278. should be computed for the message. @xref{Hashcash, ,Hashcash,gnus,
  1279. The Gnus Manual}. If @code{opportunistic}, only generate the headers
  1280. when it doesn't lead to the user having to wait.
  1281. @end table
  1282. @node Mail Variables
  1283. @section Mail Variables
  1284. @table @code
  1285. @item message-send-mail-function
  1286. @vindex message-send-mail-function
  1287. @findex message-send-mail-function
  1288. @findex message-send-mail-with-sendmail
  1289. @findex message-send-mail-with-mh
  1290. @findex message-send-mail-with-qmail
  1291. @findex message-smtpmail-send-it
  1292. @findex smtpmail-send-it
  1293. @findex feedmail-send-it
  1294. @findex message-send-mail-with-mailclient
  1295. Function used to send the current buffer as mail. The default is
  1296. @code{message-send-mail-with-sendmail}, or @code{smtpmail-send-it}
  1297. according to the system. Other valid values include
  1298. @code{message-send-mail-with-mailclient},
  1299. @code{message-send-mail-with-mh}, @code{message-send-mail-with-qmail},
  1300. @code{message-smtpmail-send-it} and @code{feedmail-send-it}.
  1301. The function
  1302. @code{message-send-mail-with-sendmail} pipes your article to the
  1303. @code{sendmail} binary for further queuing and sending. When your local
  1304. system is not configured for sending mail using @code{sendmail}, and you
  1305. have access to a remote @acronym{SMTP} server, you can set
  1306. @code{message-send-mail-function} to @code{smtpmail-send-it} and make
  1307. sure to setup the @code{smtpmail} package correctly. An example:
  1308. @lisp
  1309. (setq message-send-mail-function 'smtpmail-send-it
  1310. smtpmail-default-smtp-server "YOUR SMTP HOST")
  1311. @end lisp
  1312. To the thing similar to this, there is
  1313. @code{message-smtpmail-send-it}. It is useful if your @acronym{ISP}
  1314. requires the @acronym{POP}-before-@acronym{SMTP} authentication.
  1315. @xref{POP before SMTP, , POP before SMTP, gnus, The Gnus Manual}.
  1316. @cindex X-Message-SMTP-Method
  1317. If you have a complex @acronym{SMTP} setup, and want some messages to
  1318. go via one mail server, and other messages to go through another, you
  1319. can use the @samp{X-Message-SMTP-Method} header. These are the
  1320. supported values:
  1321. @table @samp
  1322. @item smtpmail
  1323. @example
  1324. X-Message-SMTP-Method: smtp smtp.fsf.org 587
  1325. @end example
  1326. This will send the message via @samp{smtp.fsf.org}, using port 587.
  1327. @example
  1328. X-Message-SMTP-Method: smtp smtp.fsf.org 587 other-user
  1329. @end example
  1330. This is the same as the above, but uses @samp{other-user} as the user
  1331. name when authenticating. This is handy if you have several
  1332. @acronym{SMTP} accounts on the same server.
  1333. @item sendmail
  1334. @example
  1335. X-Message-SMTP-Method: sendmail
  1336. @end example
  1337. This will send the message via the locally installed sendmail/exim/etc
  1338. installation.
  1339. @end table
  1340. @item message-mh-deletable-headers
  1341. @vindex message-mh-deletable-headers
  1342. Most versions of MH doesn't like being fed messages that contain the
  1343. headers in this variable. If this variable is non-@code{nil} (which is
  1344. the default), these headers will be removed before mailing when sending
  1345. messages via MH@. Set it to @code{nil} if your MH can handle these
  1346. headers.
  1347. @item message-qmail-inject-program
  1348. @vindex message-qmail-inject-program
  1349. @cindex qmail
  1350. Location of the qmail-inject program.
  1351. @item message-qmail-inject-args
  1352. @vindex message-qmail-inject-args
  1353. Arguments passed to qmail-inject programs.
  1354. This should be a list of strings, one string for each argument. It
  1355. may also be a function.
  1356. E.g., if you wish to set the envelope sender address so that bounces
  1357. go to the right place or to deal with listserv's usage of that address, you
  1358. might set this variable to @code{'("-f" "you@@some.where")}.
  1359. @item message-sendmail-f-is-evil
  1360. @vindex message-sendmail-f-is-evil
  1361. @cindex sendmail
  1362. Non-@code{nil} means don't add @samp{-f username} to the sendmail
  1363. command line. Doing so would be even more evil than leaving it out.
  1364. @item message-sendmail-envelope-from
  1365. @vindex message-sendmail-envelope-from
  1366. When @code{message-sendmail-f-is-evil} is @code{nil}, this specifies
  1367. the address to use in the @acronym{SMTP} envelope. If it is
  1368. @code{nil}, use @code{user-mail-address}. If it is the symbol
  1369. @code{header}, use the @samp{From} header of the message.
  1370. @item message-mailer-swallows-blank-line
  1371. @vindex message-mailer-swallows-blank-line
  1372. Set this to non-@code{nil} if the system's mailer runs the header and
  1373. body together. (This problem exists on SunOS 4 when sendmail is run
  1374. in remote mode.) The value should be an expression to test whether
  1375. the problem will actually occur.
  1376. @item message-send-mail-partially-limit
  1377. @vindex message-send-mail-partially-limit
  1378. @cindex split large message
  1379. The limitation of messages sent as message/partial. The lower bound
  1380. of message size in characters, beyond which the message should be sent
  1381. in several parts. If it is @code{nil} (which is the default), the
  1382. size is unlimited.
  1383. @end table
  1384. @node News Headers
  1385. @section News Headers
  1386. @vindex message-required-news-headers
  1387. @code{message-required-news-headers} a list of header symbols. These
  1388. headers will either be automatically generated, or, if that's
  1389. impossible, they will be prompted for. The following symbols are valid:
  1390. @table @code
  1391. @item From
  1392. @cindex From
  1393. @findex user-full-name
  1394. @findex user-mail-address
  1395. This required header will be filled out with the result of the
  1396. @code{message-make-from} function, which depends on the
  1397. @code{message-from-style}, @code{user-full-name},
  1398. @code{user-mail-address} variables.
  1399. @item Subject
  1400. @cindex Subject
  1401. This required header will be prompted for if not present already.
  1402. @item Newsgroups
  1403. @cindex Newsgroups
  1404. This required header says which newsgroups the article is to be posted
  1405. to. If it isn't present already, it will be prompted for.
  1406. @item Organization
  1407. @cindex organization
  1408. @vindex message-user-organization
  1409. @vindex message-user-organization-file
  1410. This optional header will be filled out depending on the
  1411. @code{message-user-organization} variable.
  1412. @code{message-user-organization-file} will be used if this variable is
  1413. @code{t}. This variable can also be a string (in which case this string
  1414. will be used), or it can be a function (which will be called with no
  1415. parameters and should return a string to be used).
  1416. @item Lines
  1417. @cindex Lines
  1418. This optional header will be computed by Message.
  1419. @item Message-ID
  1420. @cindex Message-ID
  1421. @vindex message-user-fqdn
  1422. @vindex mail-host-address
  1423. @vindex user-mail-address
  1424. @findex system-name
  1425. @cindex Sun
  1426. @cindex i-did-not-set--mail-host-address--so-tickle-me
  1427. This required header will be generated by Message. A unique ID will be
  1428. created based on the date, time, user name (for the local part) and the
  1429. domain part. For the domain part, message will look (in this order) at
  1430. @code{message-user-fqdn}, @code{system-name}, @code{mail-host-address}
  1431. and @code{message-user-mail-address} (i.e., @code{user-mail-address})
  1432. until a probably valid fully qualified domain name (FQDN) was found.
  1433. @item User-Agent
  1434. @cindex User-Agent
  1435. This optional header will be filled out according to the
  1436. @code{message-newsreader} local variable.
  1437. @item In-Reply-To
  1438. This optional header is filled out using the @code{Date} and @code{From}
  1439. header of the article being replied to.
  1440. @item Expires
  1441. @cindex Expires
  1442. @vindex message-expires
  1443. This extremely optional header will be inserted according to the
  1444. @code{message-expires} variable. It is highly deprecated and shouldn't
  1445. be used unless you know what you're doing.
  1446. @item Distribution
  1447. @cindex Distribution
  1448. @vindex message-distribution-function
  1449. This optional header is filled out according to the
  1450. @code{message-distribution-function} variable. It is a deprecated and
  1451. much misunderstood header.
  1452. @item Path
  1453. @cindex path
  1454. @vindex message-user-path
  1455. This extremely optional header should probably never be used.
  1456. However, some @emph{very} old servers require that this header is
  1457. present. @code{message-user-path} further controls how this
  1458. @code{Path} header is to look. If it is @code{nil}, use the server name
  1459. as the leaf node. If it is a string, use the string. If it is neither
  1460. a string nor @code{nil}, use the user name only. However, it is highly
  1461. unlikely that you should need to fiddle with this variable at all.
  1462. @end table
  1463. @cindex Mime-Version
  1464. In addition, you can enter conses into this list. The @sc{car} of this cons
  1465. should be a symbol. This symbol's name is the name of the header, and
  1466. the @sc{cdr} can either be a string to be entered verbatim as the value of
  1467. this header, or it can be a function to be called. This function should
  1468. take no arguments, and return a string to be inserted. For
  1469. instance, if you want to insert @code{Mime-Version: 1.0}, you should
  1470. enter @code{(Mime-Version . "1.0")} into the list.
  1471. If the list contains a cons where the @sc{car} of the cons is
  1472. @code{optional}, the @sc{cdr} of this cons will only be inserted if it is
  1473. non-@code{nil}.
  1474. If you want to delete an entry from this list, the following Lisp
  1475. snippet might be useful. Adjust accordingly if you want to remove
  1476. another element.
  1477. @lisp
  1478. (setq message-required-news-headers
  1479. (delq 'Message-ID message-required-news-headers))
  1480. @end lisp
  1481. Other variables for customizing outgoing news articles:
  1482. @table @code
  1483. @item message-syntax-checks
  1484. @vindex message-syntax-checks
  1485. Controls what syntax checks should not be performed on outgoing posts.
  1486. To disable checking of long signatures, for instance, add
  1487. @lisp
  1488. (signature . disabled)
  1489. @end lisp
  1490. to this list.
  1491. Valid checks are:
  1492. @table @code
  1493. @item approved
  1494. @cindex approved
  1495. Check whether the article has an @code{Approved} header, which is
  1496. something only moderators should include.
  1497. @item continuation-headers
  1498. Check whether there are continuation header lines that don't begin with
  1499. whitespace.
  1500. @item control-chars
  1501. Check for invalid characters.
  1502. @item empty
  1503. Check whether the article is empty.
  1504. @item existing-newsgroups
  1505. Check whether the newsgroups mentioned in the @code{Newsgroups} and
  1506. @code{Followup-To} headers exist.
  1507. @item from
  1508. Check whether the @code{From} header seems nice.
  1509. @item illegible-text
  1510. Check whether there is any non-printable character in the body.
  1511. @item invisible-text
  1512. Check whether there is any invisible text in the buffer.
  1513. @item long-header-lines
  1514. Check for too long header lines.
  1515. @item long-lines
  1516. @cindex long lines
  1517. Check for too long lines in the body.
  1518. @item message-id
  1519. Check whether the @code{Message-ID} looks syntactically ok.
  1520. @item multiple-headers
  1521. Check for the existence of multiple equal headers.
  1522. @item new-text
  1523. Check whether there is any new text in the messages.
  1524. @item newsgroups
  1525. Check whether the @code{Newsgroups} header exists and is not empty.
  1526. @item quoting-style
  1527. Check whether text follows last quoted portion.
  1528. @item repeated-newsgroups
  1529. Check whether the @code{Newsgroups} and @code{Followup-to} headers
  1530. contains repeated group names.
  1531. @item reply-to
  1532. Check whether the @code{Reply-To} header looks ok.
  1533. @item sender
  1534. @cindex Sender
  1535. Insert a new @code{Sender} header if the @code{From} header looks odd.
  1536. @item sendsys
  1537. @cindex sendsys
  1538. Check for the existence of version and sendsys commands.
  1539. @item shoot
  1540. Check whether the domain part of the @code{Message-ID} header looks ok.
  1541. @item shorten-followup-to
  1542. Check whether to add a @code{Followup-to} header to shorten the number
  1543. of groups to post to.
  1544. @item signature
  1545. Check the length of the signature.
  1546. @item size
  1547. Check for excessive size.
  1548. @item subject
  1549. Check whether the @code{Subject} header exists and is not empty.
  1550. @item subject-cmsg
  1551. Check the subject for commands.
  1552. @item valid-newsgroups
  1553. Check whether the @code{Newsgroups} and @code{Followup-to} headers
  1554. are valid syntactically.
  1555. @end table
  1556. All these conditions are checked by default, except for @code{sender}
  1557. for which the check is disabled by default if
  1558. @code{message-insert-canlock} is non-@code{nil} (@pxref{Canceling News}).
  1559. @item message-ignored-news-headers
  1560. @vindex message-ignored-news-headers
  1561. Regexp of headers to be removed before posting. The default is@*
  1562. @samp{^NNTP-Posting-Host:\\|^Xref:\\|^[BGF]cc:\\|^Resent-Fcc:\\|@*
  1563. ^X-Draft-From:\\|^X-Gnus-Agent-Meta-Information:}.
  1564. @item message-default-news-headers
  1565. @vindex message-default-news-headers
  1566. This string is inserted at the end of the headers in all message
  1567. buffers that are initialized as news.
  1568. @end table
  1569. @node News Variables
  1570. @section News Variables
  1571. @table @code
  1572. @item message-send-news-function
  1573. @vindex message-send-news-function
  1574. Function used to send the current buffer as news. The default is
  1575. @code{message-send-news}.
  1576. @item message-post-method
  1577. @vindex message-post-method
  1578. Gnusish @dfn{select method} (see the Gnus manual for details) used for
  1579. posting a prepared news message.
  1580. @end table
  1581. @node Insertion Variables
  1582. @section Insertion Variables
  1583. @table @code
  1584. @item message-cite-style
  1585. @vindex message-cite-style
  1586. The overall style to be used when replying to messages. This controls
  1587. things like where the reply should be put relative to the original,
  1588. how the citation is formatted, where the signature goes, etc.
  1589. Value is either @code{nil} (no variable overrides) or a let-style list
  1590. of pairs @code{(VARIABLE VALUE)} to override default values.
  1591. See @code{gnus-posting-styles} to set this variable for specific
  1592. groups. Presets to impersonate popular mail agents are available in the
  1593. @code{message-cite-style-*} variables.
  1594. @item message-cite-reply-position
  1595. @vindex message-cite-reply-position
  1596. Where the reply should be positioned. Available styles are
  1597. @code{traditional} to reply inline, @code{above} for top-posting, and
  1598. @code{below} for bottom-posting
  1599. @item message-ignored-cited-headers
  1600. @vindex message-ignored-cited-headers
  1601. All headers that match this regexp will be removed from yanked
  1602. messages. The default is @samp{.}, which means that all headers will be
  1603. removed.
  1604. @item message-cite-prefix-regexp
  1605. @vindex message-cite-prefix-regexp
  1606. Regexp matching the longest possible citation prefix on a line.
  1607. @item message-citation-line-function
  1608. @vindex message-citation-line-function
  1609. @cindex attribution line
  1610. Function called to insert the citation line. The default is
  1611. @code{message-insert-citation-line}, which will lead to citation lines
  1612. that look like:
  1613. @example
  1614. Hallvard B Furuseth <h.b.furuseth@@usit.uio.no> writes:
  1615. @end example
  1616. @c FIXME: Add 'message-insert-formatted-citation-line' and
  1617. @c 'message-citation-line-format'.
  1618. Point will be at the beginning of the body of the message when this
  1619. function is called.
  1620. Note that Gnus provides a feature where clicking on @samp{writes:} hides the
  1621. cited text. If you change the citation line too much, readers of your
  1622. messages will have to adjust their Gnus, too. See the variable
  1623. @code{gnus-cite-attribution-suffix}. @xref{Article Highlighting, ,
  1624. Article Highlighting, gnus, The Gnus Manual}, for details.
  1625. @item message-yank-prefix
  1626. @vindex message-yank-prefix
  1627. @cindex yanking
  1628. @cindex quoting
  1629. When you are replying to or following up an article, you normally want
  1630. to quote the person you are answering. Inserting quoted text is done by
  1631. @dfn{yanking}, and each line you yank will have
  1632. @code{message-yank-prefix} prepended to it (except for quoted lines
  1633. which use @code{message-yank-cited-prefix} and empty lines which use
  1634. @code{message-yank-empty-prefix}). The default is @samp{> }.
  1635. @item message-yank-cited-prefix
  1636. @vindex message-yank-cited-prefix
  1637. @cindex yanking
  1638. @cindex cited
  1639. @cindex quoting
  1640. When yanking text from an article which contains already cited text,
  1641. each line will be prefixed with the contents of this variable. The
  1642. default is @samp{>}. See also @code{message-yank-prefix}.
  1643. @item message-yank-empty-prefix
  1644. @vindex message-yank-empty-prefix
  1645. @cindex yanking
  1646. @cindex quoting
  1647. When yanking text from an article, each empty line will be prefixed with
  1648. the contents of this variable. The default is @samp{>}. You can set
  1649. this variable to an empty string to split the cited text into paragraphs
  1650. automatically. See also @code{message-yank-prefix}.
  1651. @item message-indentation-spaces
  1652. @vindex message-indentation-spaces
  1653. Number of spaces to indent yanked messages.
  1654. @item message-cite-function
  1655. @vindex message-cite-function
  1656. @findex message-cite-original
  1657. @findex message-cite-original-without-signature
  1658. Function for citing an original message. The default is
  1659. @code{message-cite-original}, which simply inserts the original message
  1660. and prepends @samp{> } to each line.
  1661. @code{message-cite-original-without-signature} does the same, but elides
  1662. the signature.
  1663. @item message-indent-citation-function
  1664. @vindex message-indent-citation-function
  1665. Function for modifying a citation just inserted in the mail buffer.
  1666. This can also be a list of functions. Each function can find the
  1667. citation between @code{(point)} and @code{(mark t)}. And each function
  1668. should leave point and mark around the citation text as modified.
  1669. @item message-mark-insert-begin
  1670. @vindex message-mark-insert-begin
  1671. String to mark the beginning of some inserted text.
  1672. @item message-mark-insert-end
  1673. @vindex message-mark-insert-end
  1674. String to mark the end of some inserted text.
  1675. @item message-signature
  1676. @vindex message-signature
  1677. String to be inserted at the end of the message buffer. If @code{t}
  1678. (which is the default), the @code{message-signature-file} file will be
  1679. inserted instead. If a function, the result from the function will be
  1680. used instead. If a form, the result from the form will be used instead.
  1681. If this variable is @code{nil}, no signature will be inserted at all.
  1682. @item message-signature-file
  1683. @vindex message-signature-file
  1684. File containing the signature to be inserted at the end of the buffer.
  1685. If a path is specified, the value of
  1686. @code{message-signature-directory} is ignored, even if set.
  1687. The default is @file{~/.signature}.
  1688. @item message-signature-directory
  1689. @vindex message-signature-directory
  1690. Name of directory containing signature files. Comes in handy if you
  1691. have many such files, handled via Gnus posting styles for instance.
  1692. If @code{nil} (the default), @code{message-signature-file} is expected
  1693. to specify the directory if needed.
  1694. @item message-signature-insert-empty-line
  1695. @vindex message-signature-insert-empty-line
  1696. If @code{t} (the default value) an empty line is inserted before the
  1697. signature separator.
  1698. @end table
  1699. Note that RFC1036bis says that a signature should be preceded by the three
  1700. characters @samp{-- } on a line by themselves. This is to make it
  1701. easier for the recipient to automatically recognize and process the
  1702. signature. So don't remove those characters, even though you might feel
  1703. that they ruin your beautiful design, like, totally.
  1704. Also note that no signature should be more than four lines long.
  1705. Including @acronym{ASCII} graphics is an efficient way to get
  1706. everybody to believe that you are silly and have nothing important to
  1707. say.
  1708. @node Various Message Variables
  1709. @section Various Message Variables
  1710. @table @code
  1711. @item message-default-charset
  1712. @vindex message-default-charset
  1713. @cindex charset
  1714. Symbol naming a @acronym{MIME} charset. Non-@acronym{ASCII} characters
  1715. in messages are assumed to be encoded using this charset. The default
  1716. is @code{iso-8859-1} on non-@sc{mule} Emacsen; otherwise @code{nil},
  1717. which means ask the user. (This variable is used only on non-@sc{mule}
  1718. Emacsen.) @xref{Charset Translation, , Charset Translation, emacs-mime,
  1719. Emacs MIME Manual}, for details on the @sc{mule}-to-@acronym{MIME}
  1720. translation process.
  1721. @item message-fill-column
  1722. @vindex message-fill-column
  1723. @cindex auto-fill
  1724. Local value for the column beyond which automatic line-wrapping should
  1725. happen for message buffers. If non-@code{nil} (the default), also turn on
  1726. auto-fill in message buffers.
  1727. @item message-signature-separator
  1728. @vindex message-signature-separator
  1729. Regexp matching the signature separator. It is @samp{^-- *$} by
  1730. default.
  1731. @item mail-header-separator
  1732. @vindex mail-header-separator
  1733. String used to separate the headers from the body. It is @samp{--text
  1734. follows this line--} by default.
  1735. @item message-directory
  1736. @vindex message-directory
  1737. Directory used by many mailish things. The default is @file{~/Mail/}.
  1738. All other mail file variables are derived from @code{message-directory}.
  1739. @item message-auto-save-directory
  1740. @vindex message-auto-save-directory
  1741. Directory where Message auto-saves buffers if Gnus isn't running. If
  1742. @code{nil}, Message won't auto-save. The default is @file{~/Mail/drafts/}.
  1743. @item message-signature-setup-hook
  1744. @vindex message-signature-setup-hook
  1745. Hook run when initializing the message buffer. It is run after the
  1746. headers have been inserted but before the signature has been inserted.
  1747. @item message-setup-hook
  1748. @vindex message-setup-hook
  1749. Hook run as the last thing when the message buffer has been initialized,
  1750. but before yanked text is inserted.
  1751. @item message-header-setup-hook
  1752. @vindex message-header-setup-hook
  1753. Hook called narrowed to the headers after initializing the headers.
  1754. For instance, if you're running Gnus and wish to insert a
  1755. @samp{Mail-Copies-To} header in all your news articles and all messages
  1756. you send to mailing lists, you could do something like the following:
  1757. @lisp
  1758. (defun my-message-header-setup-hook ()
  1759. (let ((group (or gnus-newsgroup-name "")))
  1760. (when (or (message-fetch-field "newsgroups")
  1761. (gnus-group-find-parameter group 'to-address)
  1762. (gnus-group-find-parameter group 'to-list))
  1763. (insert "Mail-Copies-To: never\n"))))
  1764. (add-hook 'message-header-setup-hook
  1765. 'my-message-header-setup-hook)
  1766. @end lisp
  1767. @item message-send-hook
  1768. @vindex message-send-hook
  1769. Hook run before sending messages.
  1770. If you want to add certain headers before sending, you can use the
  1771. @code{message-add-header} function in this hook. For instance:
  1772. @findex message-add-header
  1773. @lisp
  1774. (add-hook 'message-send-hook 'my-message-add-content)
  1775. (defun my-message-add-content ()
  1776. (message-add-header "X-In-No-Sense: Nonsense")
  1777. (message-add-header "X-Whatever: no"))
  1778. @end lisp
  1779. This function won't add the header if the header is already present.
  1780. @item message-send-mail-hook
  1781. @vindex message-send-mail-hook
  1782. Hook run before sending mail messages. This hook is run very late:
  1783. just before the message is actually sent as mail.
  1784. @item message-send-news-hook
  1785. @vindex message-send-news-hook
  1786. Hook run before sending news messages. This hook is run very late:
  1787. just before the message is actually sent as news.
  1788. @item message-sent-hook
  1789. @vindex message-sent-hook
  1790. Hook run after sending messages.
  1791. @item message-cancel-hook
  1792. @vindex message-cancel-hook
  1793. Hook run when canceling news articles.
  1794. @item message-mode-syntax-table
  1795. @vindex message-mode-syntax-table
  1796. Syntax table used in message mode buffers.
  1797. @item message-cite-articles-with-x-no-archive
  1798. @vindex message-cite-articles-with-x-no-archive
  1799. If non-@code{nil}, don't strip quoted text from articles that have
  1800. @samp{X-No-Archive} set. Even if this variable isn't set, you can
  1801. undo the stripping by hitting the @code{undo} keystroke.
  1802. @item message-strip-special-text-properties
  1803. @vindex message-strip-special-text-properties
  1804. Emacs has a number of special text properties which can break message
  1805. composing in various ways. If this option is set, message will strip
  1806. these properties from the message composition buffer. However, some
  1807. packages requires these properties to be present in order to work. If
  1808. you use one of these packages, turn this option off, and hope the
  1809. message composition doesn't break too bad.
  1810. @item message-send-method-alist
  1811. @vindex message-send-method-alist
  1812. @findex message-mail-p
  1813. @findex message-news-p
  1814. @findex message-send-via-mail
  1815. @findex message-send-via-news
  1816. Alist of ways to send outgoing messages. Each element has the form:
  1817. @lisp
  1818. (@var{type} @var{predicate} @var{function})
  1819. @end lisp
  1820. @table @var
  1821. @item type
  1822. A symbol that names the method.
  1823. @item predicate
  1824. A function called without any parameters to determine whether the
  1825. message is a message of type @var{type}. The function will be called in
  1826. the buffer where the message is.
  1827. @item function
  1828. A function to be called if @var{predicate} returns non-@code{nil}.
  1829. @var{function} is called with one parameter---the prefix.
  1830. @end table
  1831. The default is:
  1832. @lisp
  1833. ((news message-news-p message-send-via-news)
  1834. (mail message-mail-p message-send-via-mail))
  1835. @end lisp
  1836. The @code{message-news-p} function returns non-@code{nil} if the message
  1837. looks like news, and the @code{message-send-via-news} function sends the
  1838. message according to the @code{message-send-news-function} variable
  1839. (@pxref{News Variables}). The @code{message-mail-p} function returns
  1840. non-@code{nil} if the message looks like mail, and the
  1841. @code{message-send-via-mail} function sends the message according to the
  1842. @code{message-send-mail-function} variable (@pxref{Mail Variables}).
  1843. All the elements in this alist will be tried in order, so a message
  1844. containing both a valid @samp{Newsgroups} header and a valid @samp{To}
  1845. header, for example, will be sent as news, and then as mail.
  1846. @end table
  1847. @node Sending Variables
  1848. @section Sending Variables
  1849. @table @code
  1850. @item message-fcc-handler-function
  1851. @vindex message-fcc-handler-function
  1852. A function called to save outgoing articles. This function will be
  1853. called with the name of the file to store the article in. The default
  1854. function is @code{message-output} which saves in Unix mailbox format.
  1855. @item message-courtesy-message
  1856. @vindex message-courtesy-message
  1857. When sending combined messages, this string is inserted at the start of
  1858. the mailed copy. If the string contains the format spec @samp{%s}, the
  1859. newsgroups the article has been posted to will be inserted there. If
  1860. this variable is @code{nil}, no such courtesy message will be added.
  1861. The default value is @samp{"The following message is a courtesy copy of
  1862. an article\\nthat has been posted to %s as well.\\n\\n"}.
  1863. @item message-fcc-externalize-attachments
  1864. @vindex message-fcc-externalize-attachments
  1865. If @code{nil}, attach files as normal parts in Fcc copies; if it is
  1866. non-@code{nil}, attach local files as external parts.
  1867. @item message-interactive
  1868. @vindex message-interactive
  1869. If non-@code{nil} wait for and display errors when sending a message;
  1870. if @code{nil} let the mailer mail back a message to report errors.
  1871. @item message-confirm-send
  1872. @vindex message-confirm-send
  1873. When non-@code{nil}, Gnus will ask for confirmation when sending a
  1874. message.
  1875. @end table
  1876. @node Message Buffers
  1877. @section Message Buffers
  1878. Message will generate new buffers with unique buffer names when you
  1879. request a message buffer. When you send the message, the buffer isn't
  1880. normally killed off. Its name is changed and a certain number of old
  1881. message buffers are kept alive.
  1882. @table @code
  1883. @item message-generate-new-buffers
  1884. @vindex message-generate-new-buffers
  1885. Controls whether to create a new message buffer to compose a message.
  1886. Valid values include:
  1887. @table @code
  1888. @item nil
  1889. Generate the buffer name in the Message way (e.g., *mail*, *news*, *mail
  1890. to whom*, *news on group*, etc.)@: and continue editing in the existing
  1891. buffer of that name. If there is no such buffer, it will be newly
  1892. created.
  1893. @item unique
  1894. @item t
  1895. Create the new buffer with the name generated in the Message way.
  1896. @item unsent
  1897. Similar to @code{unique} but the buffer name begins with "*unsent ".
  1898. @item standard
  1899. Similar to @code{nil} but the buffer name is simpler like *mail
  1900. message*.
  1901. @end table
  1902. @table @var
  1903. @item function
  1904. If this is a function, call that function with three parameters: The
  1905. type, the To address and the group name (any of these may be
  1906. @code{nil}). The function should return the new buffer name.
  1907. @end table
  1908. The default value is @code{unsent}.
  1909. @item message-max-buffers
  1910. @vindex message-max-buffers
  1911. This variable says how many old message buffers to keep. If there are
  1912. more message buffers than this, the oldest buffer will be killed. The
  1913. default is 10. If this variable is @code{nil}, no old message buffers
  1914. will ever be killed.
  1915. @item message-send-rename-function
  1916. @vindex message-send-rename-function
  1917. After sending a message, the buffer is renamed from, for instance,
  1918. @samp{*reply to Lars*} to @samp{*sent reply to Lars*}. If you don't
  1919. like this, set this variable to a function that renames the buffer in a
  1920. manner you like. If you don't want to rename the buffer at all, you can
  1921. say:
  1922. @lisp
  1923. (setq message-send-rename-function 'ignore)
  1924. @end lisp
  1925. @item message-kill-buffer-on-exit
  1926. @findex message-kill-buffer-on-exit
  1927. If non-@code{nil}, kill the buffer immediately on exit.
  1928. @end table
  1929. @node Message Actions
  1930. @section Message Actions
  1931. When Message is being used from a news/mail reader, the reader is likely
  1932. to want to perform some task after the message has been sent. Perhaps
  1933. return to the previous window configuration or mark an article as
  1934. replied.
  1935. @vindex message-kill-actions
  1936. @vindex message-postpone-actions
  1937. @vindex message-exit-actions
  1938. @vindex message-send-actions
  1939. The user may exit from the message buffer in various ways. The most
  1940. common is @kbd{C-c C-c}, which sends the message and exits. Other
  1941. possibilities are @kbd{C-c C-s} which just sends the message, @kbd{C-c
  1942. C-d} which postpones the message editing and buries the message buffer,
  1943. and @kbd{C-c C-k} which kills the message buffer. Each of these actions
  1944. have lists associated with them that contains actions to be executed:
  1945. @code{message-send-actions}, @code{message-exit-actions},
  1946. @code{message-postpone-actions}, and @code{message-kill-actions}.
  1947. Message provides a function to interface with these lists:
  1948. @code{message-add-action}. The first parameter is the action to be
  1949. added, and the rest of the arguments are which lists to add this action
  1950. to. Here's an example from Gnus:
  1951. @lisp
  1952. (message-add-action
  1953. `(set-window-configuration ,(current-window-configuration))
  1954. 'exit 'postpone 'kill)
  1955. @end lisp
  1956. This restores the Gnus window configuration when the message buffer is
  1957. killed, postponed or exited.
  1958. An @dfn{action} can be either: a normal function, or a list where the
  1959. @sc{car} is a function and the @sc{cdr} is the list of arguments, or
  1960. a form to be @code{eval}ed.
  1961. @node Compatibility
  1962. @chapter Compatibility
  1963. @cindex compatibility
  1964. Message uses virtually only its own variables---older @code{mail-}
  1965. variables aren't consulted. To force Message to take those variables
  1966. into account, you can put the following in your @file{.emacs} file:
  1967. @lisp
  1968. (require 'messcompat)
  1969. @end lisp
  1970. This will initialize many Message variables from the values in the
  1971. corresponding mail variables.
  1972. @node Appendices
  1973. @chapter Appendices
  1974. @menu
  1975. * Responses:: Standard rules for determining where responses go.
  1976. @end menu
  1977. @node Responses
  1978. @section Responses
  1979. To determine where a message is to go, the following algorithm is used
  1980. by default.
  1981. @table @dfn
  1982. @item reply
  1983. A @dfn{reply} is when you want to respond @emph{just} to the person who
  1984. sent the message via mail. There will only be one recipient. To
  1985. determine who the recipient will be, the following headers are
  1986. consulted, in turn:
  1987. @table @code
  1988. @item Reply-To
  1989. @item From
  1990. @end table
  1991. @item wide reply
  1992. A @dfn{wide reply} is a mail response that includes @emph{all} entities
  1993. mentioned in the message you are responding to. All mailboxes from the
  1994. following headers will be concatenated to form the outgoing
  1995. @code{To}/@code{Cc} headers:
  1996. @table @code
  1997. @item From
  1998. (unless there's a @code{Reply-To}, in which case that is used instead).
  1999. @item Cc
  2000. @item To
  2001. @end table
  2002. If a @code{Mail-Copies-To} header is present, it will also be included
  2003. in the list of mailboxes. If this header is @samp{never}, that means
  2004. that the @code{From} (or @code{Reply-To}) mailbox will be suppressed.
  2005. @item followup
  2006. A @dfn{followup} is a response sent via news. The following headers
  2007. (listed in order of precedence) determine where the response is to be
  2008. sent:
  2009. @table @code
  2010. @item Followup-To
  2011. @item Newsgroups
  2012. @end table
  2013. If a @code{Mail-Copies-To} header is present, it will be used as the
  2014. basis of the new @code{Cc} header, except if this header is
  2015. @samp{never}.
  2016. @end table
  2017. @node GNU Free Documentation License
  2018. @chapter GNU Free Documentation License
  2019. @include doclicense.texi
  2020. @node Index
  2021. @chapter Index
  2022. @printindex cp
  2023. @node Key Index
  2024. @chapter Key Index
  2025. @printindex ky
  2026. @bye
  2027. @c End: