• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/emacs-92/emacs/lisp/gnus/

Lines Matching +defs:mime +defs:to +defs:mml

22 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
49 (require 'mml)
120 "*How many buffers to keep before starting to kill them off."
125 "Function called to rename the buffer after sending it."
130 "*A function called to save outgoing articles.
131 This function will be called with the name of the file to store the
145 "The following message is a courtesy copy of an article\nthat has been posted to %s as well.\n\n"
148 the article has been posted to will be inserted there.
155 "*Regexp that matches headers to be removed in resent bounced mail."
179 "Whether to insert a Cancel-Lock header in news postings."
186 ;; Guess this one shouldn't be easy to customize...
189 `(signature . disabled)' to this list.
197 `repeated-newsgroups', `reply-to', `sender', `sendsys', `shoot',
198 `shorten-followup-to', `signature', `size', `subject', `subject-cmsg'
205 "*Headers to be generated or prompted for when sending a message.
215 "*Headers to be generated when saving a draft message."
226 "*Headers to be generated or prompted for when posting an article.
229 User-Agent are optional. If you don't want message to insert some
239 "*Headers to be generated or prompted for when mailing a message.
248 "Headers to be deleted if they already exist and were generated by message previously."
255 "*Regexp of headers to be removed unconditionally before posting."
259 :type '(repeat :value-to-internal (lambda (widget value)
268 "*Regexp of headers to be removed unconditionally before mailing."
276 It's best to delete old Path and Date headers before posting to avoid
280 :type '(repeat :value-to-internal (lambda (widget value)
297 "*What to do with trailing \"(was: <old subject>)\" in subject lines.
316 `message-subject-trailing-was-query' is set to the symbol `ask'. If
320 It is okay to create some false positives here, as the user is asked."
330 If `message-subject-trailing-was-query' is set to t, the subject is
343 "How to mark the beginning of some inserted text."
351 "How to mark the end of some inserted text."
358 "Header to insert when you don't want your article to be archived.
367 "Note to insert why you wouldn't want this posting archived.
375 ;; inspired by JoH-followup-to by Jochem Huhman <joh at gmx.de>
383 "When non-nil `message-cross-post-followup-to' will perform a crosspost.
384 If nil, `message-cross-post-followup-to' will only do a followup. Note that
386 `message-cross-post-followup-to' with a prefix."
392 "Note to insert before signature to notify of cross-post and follow-up."
397 (defcustom message-followup-to-note "Followup-To: "
398 "Note to insert before signature to notify of follow-up only."
404 "Function to use to insert note about Crosspost or Followup-To.
429 nil means let mailer mail back a message to report errors."
436 "*Say whether to create a new message buffer to compose a message.
441 *mail to whom*, *news on group*, etc.) and continue editing in the
449 Similar to `unique' but the buffer name begins with \"*unsent \".
452 Similar to nil but the buffer name is simpler like *mail message*.
481 "*String to be used as an Organization header.
496 "*List of functions called to generate subject headers for forwarded messages.
507 to it."
515 (defcustom message-forward-as-mime t
523 (defcustom message-forward-show-mml 'best
526 Can also be the symbol `best' to indicate that MML should be
527 used, except when it is a bad idea to use MML. One example where
529 message, because converting MIME to MML would invalidate the
543 "*Non-nil means try to remove as much cruft as possible from the subject.
553 :type '(repeat :value-to-internal (lambda (widget value)
564 :type '(repeat :value-to-internal (lambda (widget value)
602 "Message to be inserted in the cancel message."
607 ;; Useful to set in site-init.el
610 "Function to call to send the current buffer as mail.
631 "Function to call to send the current buffer as news.
639 (defcustom message-reply-to-function nil
647 (defcustom message-wide-reply-to-function nil
655 (defcustom message-followup-to-function nil
663 (defcustom message-use-followup-to 'ask
664 "*Specifies what to do with Followup-To header.
667 always query the user whether to use the value. If it is the symbol
676 (defcustom message-use-mail-followup-to 'use
677 "*Specifies what to do with Mail-Followup-To header.
679 query the user whether to use the value. If it is the symbol `use',
690 If nil, do not attempt to determine list subscription with functions.
692 regular expressions to match lists. These functions can be used in
701 "*A file containing addresses the user is subscribed to.
702 If nil, do not look at any files to determine list subscriptions. If
710 "*Specifies a list of addresses the user is subscribed to.
720 "*Specifies a list of addresses the user is subscribed to.
730 "Specifies what to do when there are no recipients other than Gcc/Fcc.
742 "*Non-nil means don't add \"-f username\" to the sendmail command line.
767 "Arguments passed to qmail-inject programs.
771 For e.g., if you wish to set the envelope sender address so that bounces
772 go to the right place or to deal with listserv's usage of that address, you
773 might set this variable to '(\"-f\" \"you@some.where\")."
779 (defvar message-cater-to-broken-inn t
795 "*Method used to post news.
801 ;; create a dependence to `gnus.el'.
809 "Which headers should be generated before starting to compose a message.
810 If t, generate all required headers. This can also be a list of headers to
812 `message-required-mail-headers' specify which headers to generate.
815 are to be deleted and then re-generated before sending, so this variable
851 "Hook run in a message mode buffer narrowed to the headers."
856 "Hook called narrowed to the headers when setting up a message buffer."
871 "*Function called to insert the \"Whomever writes:\" line.
874 `writes:' to hide the cited text. If you change this line too much,
875 people who read your message will have to change their Gnus
884 Fix `message-cite-prefix-regexp' if it is set to an abnormal value.
892 Fix `message-cite-prefix-regexp' if it is set to an abnormal value.
900 "*Number of spaces to insert at the beginning of each cited line.
931 "*String to be inserted at the end of the message buffer.
957 "*Function called to return a Distribution header."
990 "A list of actions to be performed upon successful sending of a message.")
992 "A list of actions to be performed upon exiting after sending a message.")
994 "A list of actions to be performed before killing a message buffer.")
996 "A list of actions to be performed after postponing a message.")
1005 "*A string containing header lines to be inserted in outgoing messages.
1013 "*A string of header lines to be inserted in outgoing mails."
1020 "*A string of header lines to be inserted in outgoing news articles."
1041 ;; According to RFC822, "The field-name must be composed of printable
1048 The value should be an expression to test whether the problem will
1060 "If non-nil, delete the deletable headers before feeding to mh.")
1065 "Alist of ways to send outgoing messages.
1071 called without any parameters to determine whether the message is
1072 a message of type TYPE; and FUNCTION is a function to be called if
1077 "*What alias expansion type to use in Message buffers.
1096 If nil, you might be asked to input the charset."
1102 (defcustom message-dont-reply-to-names
1103 (and (boundp 'rmail-dont-reply-to-names) rmail-dont-reply-to-names)
1104 "*A regexp specifying addresses to prune when doing wide replies.
1113 "*A list of GNKSA feet you are allowed to shoot.
1115 shooting yourself in the foot. Also, Gnus allows you to shoot the
1118 `empty-article' Allow you to post an empty article;
1119 `quoted-text-only' Allow you to post quoted text only;
1120 `multiple-copies' Allow you to post multiple copies;
1121 `cancel-messages' Allow you to cancel or supersede messages from
1129 "Regexp of headers to be hidden when composing new messages.
1130 This can also be a list of regexps to match headers. Or a list
1148 (defface message-header-to
1160 (put 'message-header-to-face 'face-alias 'message-header-to)
1274 (defface message-mml
1286 (put 'message-mml-face 'face-alias 'message-mml)
1311 (2 'message-header-to nil t))
1343 ("<#/?\\(multipart\\|part\\|external\\|mml\\|secure\\)[^>]*>"
1344 (0 'message-mml))))
1345 "Additional expressions to highlight in Message mode.")
1348 ;; XEmacs does it like this. For Emacs, we have to set the
1359 The cdr of each entry is a function for applying the face to a region.")
1391 "Coding system to encode outgoing mail.")
1395 "*Coding system to compose mail.
1396 If you'd like to make it possible to share draft files between XEmacs
1398 Note that the coding-system `iso-2022-7bit' isn't suitable to all data.")
1427 subsequent addresses are subaddresses; this is used to indicate that
1428 mail sent to the first address will automatically be delivered to the
1451 (function-item :tag "Emacs interface to MH"
1459 "Whether to confirm a wide reply to multiple email recipients.
1460 If this variable is nil, don't ask whether to reply to all recipients.
1461 If this variable is non-nil, pose the question \"Reply to all
1462 recipients?\" before a wide reply to multiple recipients. If the user
1463 answers yes, reply to all recipients as usual. If the user answers
1464 no, only reply back to the author."
1482 (string= (idna-to-ascii "r�ksm�rg�s")
1485 "Whether to encode non-ASCII in domain names into ASCII according to IDNA.
1488 functionality to work."
1503 (defvar message-mime-part nil)
1524 ;; Many things can happen to an RFC 822 mailbox before it is put into
1540 ;; We want to match the results of any of these manglings.
1625 (autoload 'idna-to-ascii "idna")
1631 (autoload 'gnus-output-to-rmail "gnus-util")
1632 (autoload 'gnus-output-to-mail "gnus-util")
1679 SEPARATOR is a string of characters to be used as separators. \",\"
1724 The buffer is expected to be narrowed to just the header of the message;
1725 see `message-narrow-to-headers-or-head'."
1736 "The same as `message-fetch-field', only narrow to the headers first."
1739 (message-narrow-to-headers-or-head)
1742 (defun message-narrow-to-field ()
1743 "Narrow the buffer to the header on the current line."
1745 (narrow-to-region
1757 "Add the HEADERS to the message header, skipping those already present."
1764 (message-narrow-to-headers)
1784 "Fetch field HEADER from the message we're replying to."
1787 (mail-narrow-to-head)
1872 Hit RET to replace non-decodable characters with \"%s\" or enter replacement
1930 "to get rid of this query."
1949 (message-narrow-to-headers)
1973 ;; add to the end of the region first, otherwise end would be invalid
1982 (interactive "fFile to insert: ")
1983 ;; reverse insertion to get correct result.
1994 prefix argument, ask for a text to insert. If you don't want the note in the
1995 body, set `message-archive-note' to nil."
2010 (defun message-cross-post-followup-to-header (target-group)
2011 "Mangles FollowUp-To and Newsgroups header to point to TARGET-GROUP.
2030 ;; unless (followup is to poster or user explicitly asked not
2031 ;; to cross-post, or target-group is already in Newsgroups)
2032 ;; add target-group to Newsgroups line.
2044 ;; unless new followup would be identical to Newsgroups line
2057 group to Followup-To. When CROSS-POST is t, insert note about
2060 been made to before the user asked for a Crosspost."
2073 (concat "^" (regexp-quote message-followup-to-note) ".*")
2082 (insert (concat message-followup-to-note target-group "\n"))
2085 (defun message-cross-post-followup-to (target-group)
2086 "Crossposts message and set Followup-To to TARGET-GROUP.
2114 (message-cross-post-followup-to-header target-group)
2115 ;; insert note whether we do cross-post or followup-to
2124 ;;; Reduce To: to Cc: or Bcc: header
2126 (defun message-reduce-to-to-cc ()
2130 (save-restriction (message-narrow-to-headers)
2136 (message-narrow-to-headers)
2141 (message-goto-to)
2145 (message-narrow-to-headers)
2173 ;; There might be a continuation header, so we have to search
2198 (defun message-narrow-to-headers ()
2199 "Narrow the buffer to the head of the message."
2201 (narrow-to-region
2209 (defun message-narrow-to-head-1 ()
2210 "Like `message-narrow-to-head'. Don't widen."
2211 (narrow-to-region
2218 (defun message-narrow-to-head ()
2219 "Narrow the buffer to the head of the message.
2220 Point is left at the beginning of the narrowed-to region."
2222 (message-narrow-to-head-1))
2224 (defun message-narrow-to-headers-or-head ()
2225 "Narrow the buffer to the head of the message."
2227 (narrow-to-region
2243 (message-narrow-to-headers)
2245 (not (message-fetch-field "posted-to"))))))))
2253 (message-narrow-to-headers)
2254 (or (message-fetch-field "to")
2259 "Say whether we need to insert a MFT header."
2266 "Go to the beginning of the next header."
2288 "Sort the headers of the current message according to `message-header-format-alist'."
2294 (message-narrow-to-headers)
2315 ((eq arg 4) (Info-goto-node "(emacs-mime)Top"))
2334 (define-key message-mode-map "\C-c\C-f\C-t" 'message-goto-to)
2340 (define-key message-mode-map "\C-c\C-f\C-r" 'message-goto-reply-to)
2343 (define-key message-mode-map "\C-c\C-f\C-f" 'message-goto-followup-to)
2344 (define-key message-mode-map "\C-c\C-f\C-m" 'message-goto-mail-followup-to)
2350 'message-generate-unsubscribed-mail-followup-to)
2355 (define-key message-mode-map "\C-c\C-fx" 'message-cross-post-followup-to)
2356 ;; prefix+message-cross-post-followup-to = same w/o cross-post
2357 (define-key message-mode-map "\C-c\C-ft" 'message-reduce-to-to-cc)
2366 (define-key message-mode-map "\C-c\C-t" 'message-insert-to)
2369 (define-key message-mode-map "\C-c\C-l" 'message-to-list-only)
2373 'message-insert-disposition-notification-to)
2392 (define-key message-mode-map "\C-c\C-z" 'message-kill-to-signature)
2397 (define-key message-mode-map "\C-c\C-a" 'mml-attach-file)
2419 ["Kill To Signature" message-kill-to-signature t]
2442 '(:help "Ask, then arrange to send message at that time"))]
2454 ["To" message-goto-to t]
2461 ["Reply-To" message-goto-reply-to t]
2469 message-insert-disposition-notification-to
2478 ["Followup-To" message-goto-followup-to t]
2479 ;; ["Followup-To (with note in body)" message-cross-post-followup-to t]
2480 ["Crosspost / Followup-To..." message-cross-post-followup-to t]
2485 ["Fetch To" message-insert-to
2487 '(:help "Insert a To header that points to the author."))]
2493 ["Send to list only" message-to-list-only t]
2494 ["Mail-Followup-To" message-goto-mail-followup-to t]
2495 ["Unsubscribed list post" message-generate-unsubscribed-mail-followup-to
2498 ["Reduce To: to Cc:" message-reduce-to-to-cc t]
2501 ["Encode non-ASCII domain names" message-idna-to-ascii-rhs t]
2513 ;; We use `after-change-functions' to keep special text properties
2523 packages requires these properties to be present in order to work.
2533 ;; property list (rather than a list of property symbols), to be
2542 ;; We need to add XEmacs names to the list.
2550 and `read-only' when translating ascii or kana text to kanji text.
2551 These properties are essential to work, so we should never strip them."
2562 This function is intended to be called from `after-change-functions'.
2576 "Major mode for editing mail and news to be sent.
2580 C-c C-f move to a header field (and create it if there isn't):
2581 C-c C-f C-t move to To C-c C-f C-s move to Subject
2582 C-c C-f C-c move to Cc C-c C-f C-b move to Bcc
2583 C-c C-f C-w move to Fcc C-c C-f C-r move to Reply-To
2584 C-c C-f C-u move to Summary C-c C-f C-n move to Newsgroups
2585 C-c C-f C-k move to Keywords C-c C-f C-d move to Distribution
2586 C-c C-f C-o move to From (\"Originator\")
2587 C-c C-f C-f move to Followup-To
2588 C-c C-f C-m move to Mail-Followup-To
2594 C-c C-t `message-insert-to' (add a To header to a news followup)
2595 C-c C-l `message-to-list-only' (removes all but list address in to/cc)
2596 C-c C-n `message-insert-newsgroups' (add a Newsgroup header to a news reply)
2597 C-c C-b `message-goto-body' (move to beginning of message text).
2598 C-c C-i `message-goto-signature' (move to the beginning of the signature).
2604 C-c C-z `message-kill-to-signature' (kill the text up to the signature).
2606 C-c C-a `mml-attach-file' (attach a file as MIME).
2608 C-c M-n `message-insert-disposition-notification-to' (request receipt).
2635 (set (make-local-variable 'message-mime-part) 0)
2637 ;; Allow using comment commands to add/remove quoting.
2668 (mml-mode))
2682 ;; message-yank-prefix is set to an abnormal value.
2693 ; mml tags
2694 "<#!*/?\\(multipart\\|part\\|external\\|mml\\|secure\\)"))
2708 ;; solution would be not to use `define-derived-mode', and run
2723 (defun message-goto-to ()
2724 "Move point to the To header."
2729 "Move point to the From header."
2734 "Move point to the Subject header."
2739 "Move point to the Cc header."
2744 "Move point to the Bcc header."
2749 "Move point to the Fcc header."
2753 (defun message-goto-reply-to ()
2754 "Move point to the Reply-To header."
2759 "Move point to the Newsgroups header."
2764 "Move point to the Distribution header."
2768 (defun message-goto-followup-to ()
2769 "Move point to the Followup-To header."
2773 (defun message-goto-mail-followup-to ()
2774 "Move point to the Mail-Followup-To header."
2779 "Move point to the Keywords header."
2784 "Move point to the Summary header."
2789 "Move point to the beginning of the message body."
2804 "Move point to the end of the headers."
2810 "Move point to the beginning of the message signature.
2811 If there is no signature in the article, go to the end and
2820 (defun message-generate-unsubscribed-mail-followup-to (&optional include-cc)
2821 "Insert a reasonable MFT header in a post to an unsubscribed list.
2822 When making original posts to a mailing list you are not subscribed to,
2823 you have to type in a MFT header by hand. The contents, usually, are
2834 (message-narrow-to-headers)
2840 (message-goto-mail-followup-to)
2846 (defun message-insert-to (&optional force)
2847 "Insert a To header that points to the author of the article being replied to.
2848 If the original author requested not to be sent mail, don't insert unless the
2851 (let* ((mct (message-fetch-reply-field "mail-copies-to"))
2854 (to (or (message-fetch-reply-field "mail-reply-to")
2855 (message-fetch-reply-field "reply-to")
2857 (when (and dont to)
2860 "Ignoring the user request not to have copies sent via mail"
2861 "Complying with the user request not to have copies sent via mail")))
2862 (when (and force (not to))
2864 (when (and to (or force (not dont)))
2865 (message-carefully-insert-headers (list (cons 'To to))))))
2880 when the message is already `Cc'ed to the recipient."
2913 "Widen the reply to include maximum recipients."
2915 (let ((follow-to
2923 (message-narrow-to-headers)
2924 (dolist (elem follow-to)
2931 "Insert the Newsgroups header from the article being replied to."
2969 (defun message-kill-to-signature ()
2970 "Deletes all text up to the signature."
3043 (narrow-to-region beg end)
3076 ;; Is it better to use `mail-header-end'?
3131 "Insert header to mark message as important."
3135 (message-narrow-to-headers)
3141 "Insert header to mark message as unimportant."
3145 (message-narrow-to-headers)
3152 The three allowed values according to RFC 1327 are `high', `normal'
3160 (message-narrow-to-headers)
3172 (defun message-insert-disposition-notification-to ()
3173 "Request a disposition notification (return receipt) to this message.
3178 (message-narrow-to-headers)
3182 (or (message-field-value "Reply-to")
3197 "Caesar rotate region B to E by N, default 13, for decrypting netnews."
3207 (= b e)) ; no region to rotate
3232 Used to encode/decode possibly offensive messages (commonly in rec.humor).
3233 With prefix arg, specifies the number of places to rotate each letter forward.
3241 (narrow-to-region (point) (point-max)))
3249 (narrow-to-region (point) (point-max)))
3254 "Rename the *message* buffer to \"*message* RECIPIENT\".
3261 (narrow-to-region (point)
3263 (let* ((mail-to (or
3267 (mail-trimmed-to
3268 (if (string-match "," mail-to)
3269 (concat (substring mail-to 0 (match-beginning 0)) ", ...")
3270 mail-to))
3271 (name-default (concat "*message* " mail-trimmed-to))
3288 "Modify text just inserted from a message to be cited.
3299 (narrow-to-region
3336 "Insert the message being replied to, if any.
3341 This function uses `message-cite-function' to do the actual citing.
3397 (narrow-to-region start end)
3398 (message-narrow-to-head-1)
3406 (mml-quote-region start end)
3446 (narrow-to-region start end)
3447 (message-narrow-to-head-1)
3455 (mml-quote-region start end)
3474 (narrow-to-region
3591 (switch-to-buffer newbuf))))
3597 Otherwise any failure is reported in a message back to the user from
3602 ;; Make it possible to undo the coming changes.
3642 (error "No methods specified to send by"))
3668 "Eval FORMS if TYPE is to be checked."
3688 "Do various things to make the message nice before sending it."
3767 "Add ACTION to be performed when doing an exit of type TYPES."
3769 (add-to-list (intern (format "message-%s-actions" (pop types)))
3788 ;; Something to be evaled.
3822 (copy-to-buffer tembuf p (car plist))
3828 (narrow-to-region (point) (point))
3833 (narrow-to-region (point) (point))
3877 (message-narrow-to-headers)
3880 (not (mail-fetch-field "mail-followup-to")))
3883 (cons "Mail-Followup-To" (message-make-mail-followup-to))
3886 (when (equal "" (mail-fetch-field "mail-followup-to"))
3901 (error "Failed to send the message")))))
3910 (mml-buffer-substring-no-properties-except-hard-newlines
3915 (message-narrow-to-headers)
3933 (message-narrow-to-headers)
3937 (message-fetch-field "to"))
3973 If you always want Gnus to send messages in one piece, set
3974 `message-send-mail-partially-limit' to nil.
3991 resend-to-addresses delimline)
3996 (message-narrow-to-headers)
3997 (setq resend-to-addresses (message-fetch-field "resent-to")))
3998 ;; Change header-delimiter to be what sendmail expects.
4006 ;; Insert an extra newline if we need it to work around
4045 (if resend-to-addresses
4046 (list resend-to-addresses)
4057 (error "Sending...failed to %s"
4063 "Pass the prepared message buffer to qmail-inject.
4064 Refer to the documentation for the variable `message-send-mail-function'
4065 to find out how to use this."
4078 ;; qmail-inject's default behaviour is to look for addresses on the
4087 ;; various vendors, so we don't have to allow for that, either --
4093 ;; since we don't have to play that double-guessing game and the user
4099 ;; we have to look at the retval instead
4111 ;; MH wants to generate these headers itself.
4121 ;; Pass it on to mh.
4134 "Return a string that is non-trivial to guess.
4140 (prin1-to-string (recent-keys))
4141 (prin1-to-string (garbage-collect))))))
4164 (message-narrow-to-headers-or-head)
4167 (message-narrow-to-headers-or-head)
4169 ;; BUG: We really need to get the charset for each name in the
4170 ;; Newsgroups and Followup-To lines to allow crossposting
4197 (message-narrow-to-headers)
4222 (mml-buffer-substring-no-properties-except-hard-newlines
4227 (message-narrow-to-headers)
4264 "Return non-nil if this TYPE is not to be checked."
4276 ;; We narrow to the headers and check them first.
4279 (message-narrow-to-headers)
4354 (message-check 'shorten-followup-to
4356 (followup-to (message-fetch-field "followup-to"))
4357 to)
4360 (not followup-to)
4364 (setq to (completing-read
4365 "Followups to (default no Followup-To header): "
4371 (insert "Followup-To: " to "\n"))
4377 (y-or-n-p "You appear to have a misconfigured system. Really post? ")
4402 (followup-to (message-fetch-field "followup-to"))
4404 (if followup-to
4405 (concat newsgroups "," followup-to)
4410 ;; KLUDGE to handle nnvirtual groups. Doing this right
4457 "Really post to %s unknown group%s: %s? "
4537 (not (eq (string-to-char (car addresses)) ?\()))
4545 (message-check 'reply-to
4547 (reply-to (message-fetch-field "reply-to"))
4550 ((not reply-to)
4552 ((string-match "," reply-to)
4555 reply-to)))
4559 reply-to))))) ;larsi@ifi
4564 (string-match "(.*).*(.*)" reply-to)) ;(lars) (lars)
4568 reply-to)))
4581 "<#\\(/\\)?\\(multipart\\|part\\|external\\|mml\\)")
4677 (mml-externalize-attachments message-fcc-externalize-attachments))
4680 (message-narrow-to-headers)
4688 (message-narrow-to-headers)
4706 ;; Pipe the article to the program in question.
4724 "Append this article to Unix/babyl mail file FILENAME."
4727 (gnus-output-to-rmail filename t)
4728 (gnus-output-to-mail filename t)))
4734 (message-narrow-to-headers)
4740 ;; spaces to comma and eliminate spaces around commas. Eliminate
4745 (narrow-to-region
4810 ;; You might for example insert a "." somewhere (not next to another dot
4835 ;; to this newsreader, other newsreaders might otherwise generate
4845 (char-to-string (aref "zyxwvutsrqponmlkjihgfedcba9876543210"
4875 (int-to-string (count-lines (point) (point-max))))))
4888 (defun message-make-in-reply-to ()
4934 ;; Add the future to current.
4978 ;; according to RFC 822.
5010 This function tries to ignore all user modifications, and
5051 ;; `message-user-fqdn' seems to be valid
5069 ;; Default to this bogus thing.
5085 (defun message-to-list-only ()
5086 "Send a message to the list only.
5089 (let ((listaddr (message-make-mail-followup-to t)))
5092 (message-remove-header "to")
5097 (defun message-make-mail-followup-to (&optional only-show-subscribed)
5102 (to (message-fetch-field "To"))
5104 (msg-recipients (concat to (and to cc ", ") cc))
5141 (defun message-idna-to-ascii-rhs-1 (header)
5152 (setq ace (downcase (idna-to-ascii rhs)))
5159 (message-narrow-to-field)
5165 (defun message-idna-to-ascii-rhs ()
5172 (message-narrow-to-head)
5173 (message-idna-to-ascii-rhs-1 "From")
5174 (message-idna-to-ascii-rhs-1 "To")
5175 (message-idna-to-ascii-rhs-1 "Reply-To")
5176 (message-idna-to-ascii-rhs-1 "Mail-Reply-To")
5177 (message-idna-to-ascii-rhs-1 "Mail-Followup-To")
5178 (message-idna-to-ascii-rhs-1 "Cc")))))
5185 (message-narrow-to-headers)
5193 (In-Reply-To (message-make-in-reply-to))
5257 ;; string to be inserted verbatim, or it is a
5301 ;; Add the deletable property to the headers that require it.
5324 ;; Rename any old Sender headers to Original-Sender.
5333 (message-idna-to-ascii-rhs))))
5340 (message-narrow-to-headers)
5358 (narrow-to-region (point) (point))
5363 (narrow-to-region (point-min) (1- (point-max)))
5404 (narrow-to-region begin (point))
5422 "Trim REFERENCES to be 21 Message-ID long or less, and fold them.
5451 (when (and message-this-is-news message-cater-to-broken-inn)
5457 ;; Decide how many elements to cut off...
5469 (if (and message-this-is-news message-cater-to-broken-inn)
5475 "Move point to where the user probably wants to find it."
5476 (message-narrow-to-headers)
5495 goes to beginning of header values."
5502 "Move point to beginning of header value or to beginning of line.
5503 The prefix argument N is passed directly to `beginning-of-line'.
5505 This command is identical to `beginning-of-line' if point is
5510 line, move point to the beginning of the header value or the beginning of line,
5511 whichever is closer. If point is already at beginning of line, move point to
5529 (defun message-buffer-name (type &optional to group)
5536 (if to
5537 (concat " to "
5538 (or (car (mail-extract-address-components to))
5539 to) "")
5546 (funcall message-generate-new-buffers type to group))
5550 (if to
5551 (concat " to "
5552 (or (car (mail-extract-address-components to))
5553 to) "")
5562 (message-buffer-name type to group))))
5579 (cons (string-to-number (or (match-string 1 b) "1"))
5585 (defun message-pop-to-buffer (name &optional switch-function)
5586 "Pop to buffer NAME, and warn if it already exists and is modified."
5596 (funcall (or switch-function 'pop-to-buffer) buffer)
5604 (funcall (or switch-function 'pop-to-buffer) name)
5627 "\\`\\*\\(sent \\|unsent \\)?\\(.+\\)\\*[^\\*]*\\|\\`mail to "
5630 to group)
5635 (message-narrow-to-headers)
5636 (setq to (message-fetch-field "to"))
5641 (to (concat "*sent mail to "
5642 (or (car (mail-extract-address-components to))
5643 to) "*"))
5666 subject to field yank-action)
5678 (setq to (cdr field))
5681 (compose-mail to subject
5689 (defun message-headers-to-generate (headers included-headers excluded-headers)
5717 (add-to-list 'message-send-actions
5748 (message-headers-to-generate
5759 (message-headers-to-generate
5767 (message-narrow-to-headers)
5772 ;; Do this last to give it precedence over posting styles, etc.
5775 (message-narrow-to-headers)
5813 (message-narrow-to-headers)
5833 (defun message-mail (&optional to subject
5836 "Start editing a mail message to be sent.
5838 to continue editing a message already being composed. SWITCH-FUNCTION
5839 is a function used to switch to and display the mail buffer."
5843 (message-pop-to-buffer
5850 (message-buffer-name "mail" to))
5858 `((To . ,(or to "")) (Subject . ,(or subject "")))
5866 "Start editing a news article to be sent."
5869 (message-pop-to-buffer (message-buffer-name "posting" nil newsgroups))
5873 (defun message-get-reply-headers (wide &optional to-address address-headers)
5874 (let (follow-to mct never-mct to cc author mft recipients)
5877 (message-narrow-to-headers-or-head)
5880 (setq to (or (message-fetch-field "to")
5884 (message-fetch-field "original-to")))
5886 mct (message-fetch-field "mail-copies-to")
5887 author (or (message-fetch-field "mail-reply-to")
5888 (message-fetch-field "reply-to")
5891 mft (and message-use-mail-followup-to
5892 (message-fetch-field "mail-followup-to"))))
5916 (or (not (eq message-use-mail-followup-to 'ask))
5923 which directs your response to " (if (string-match "," mft)
5927 Most commonly, Mail-Followup-To is used by a mailing list poster to
5928 express that responses should be sent to just the list, and not the
5931 If a message is posted to several mailing lists, Mail-Followup-To may
5932 also be used to direct the following discussion to one list only,
5933 because discussions that are spread over several lists tend to be
5934 fragmented and very difficult to follow.
5937 responses here are directed to other addresses.
5939 You may customize the variable `message-use-mail-followup-to', if you
5940 want to get rid of this query permanently.")))
5942 (to-address
5943 (setq recipients (concat ", " to-address))
5944 ;; If the author explicitly asked for a copy, we don't deny it to them.
5948 (if to (setq recipients (concat recipients ", " to)))
5957 ;; Remove addresses that match `rmail-dont-reply-to-names'.
5958 (let ((rmail-dont-reply-to-names message-dont-reply-to-names))
5959 (setq recipients (rmail-dont-reply-to recipients)))
5963 ;; Convert string to a list of (("foo@bar" . "Name <Foo@BAR>") ...).
5991 ;; Build the header alist. Allow the user to be asked whether
5992 ;; or not to reply to all recipients in a wide reply.
5993 (setq follow-to (list (cons 'To (cdr (pop recipients)))))
5996 (y-or-n-p "Reply to all recipients? ")))
6001 (push (cons 'Cc recipients) follow-to)))
6002 follow-to))
6010 The functions are applied when replying to a message.
6012 Useful functions to put in this list include:
6038 (defun message-reply (&optional to-address wide)
6039 "Start editing a reply to the article in the current buffer."
6043 from subject date reply-to to cc
6044 references message-id follow-to
6049 (message-narrow-to-head-1)
6050 ;; Allow customizations to have their say.
6053 (when (functionp message-reply-to-function)
6055 (setq follow-to (funcall message-reply-to-function))))
6057 (when (functionp message-wide-reply-to-function)
6059 (setq follow-to
6060 (funcall message-wide-reply-to-function)))))
6074 (unless follow-to
6075 (setq follow-to (message-get-reply-headers wide to-address))))
6078 (message-pop-to-buffer
6081 (if wide to-address nil))))
6088 ,@follow-to)
6092 (defun message-wide-reply (&optional to-address)
6093 "Make a \"wide\" reply to the message in the current buffer."
6095 (message-reply to-address t))
6098 (defun message-followup (&optional to-newsgroups)
6099 "Follow up to the message in the current buffer.
6104 from subject date reply-to mrt mct
6105 references message-id follow-to
6108 followup-to distribution newsgroups gnus-warning posted-to)
6110 (narrow-to-region
6115 (when (functionp message-followup-to-function)
6116 (setq follow-to
6117 (funcall message-followup-to-function)))
6123 followup-to (message-fetch-field "followup-to")
6125 posted-to (message-fetch-field "posted-to")
6126 reply-to (message-fetch-field "reply-to")
6127 mrt (message-fetch-field "mail-reply-to")
6129 mct (message-fetch-field "mail-copies-to"))
6142 (message-pop-to-buffer (message-buffer-name "followup" from newsgroups))
6150 (to-newsgroups
6151 (list (cons 'Newsgroups to-newsgroups)))
6152 (follow-to follow-to)
6153 ((and followup-to message-use-followup-to)
6156 ((equal (downcase followup-to) "poster")
6157 (if (or (eq message-use-followup-to 'use)
6164 does not read the newsgroup, so he wouldn't see any replies sent to it.
6166 You may customize the variable `message-use-followup-to', if you
6167 want to get rid of this query permanently."))
6170 (cons 'To (or mrt reply-to from "")))
6173 (if (or (equal followup-to newsgroups)
6174 (not (eq message-use-followup-to 'ask))
6176 (concat "Obey Followup-To: " followup-to "? ") t "\
6179 `Followup-To: " followup-to "'
6180 directs your response to " (if (string-match "," followup-to)
6184 If a message is posted to several newsgroups, Followup-To is often
6185 used to direct the following discussion to one newsgroup only,
6186 because discussions that are spread over several newsgroup tend to
6187 be fragmented and very difficult to follow.
6190 responses here are directed to other newsgroups.
6192 You may customize the variable `message-use-followup-to', if you
6193 want to get rid of this query permanently."))
6194 (cons 'Newsgroups followup-to)
6196 (posted-to
6197 `((Newsgroups . ,posted-to)))
6206 (or mrt reply-to from "")
6213 If you have added 'cancel-messages to `message-shoot-gnksa-feet', all articles
6214 are yours except those that have Cancel-Lock header not belonging to you.
6216 regexp to match all of yours addresses."
6229 (message-narrow-to-head-1)
6233 (error "Failed to verify Cancel-lock: This article is not yours"))
6240 ;; Email address in From field equals to our address
6265 (message-narrow-to-head-1)
6273 (when (yes-or-no-p "Do you really want to cancel this article? ")
6299 "Start composing a message to supersede the current message.
6304 ;; Check whether the user owns the article that is to be superseded.
6308 (message-pop-to-buffer (message-buffer-name "supersede"))
6310 (mime-to-mml)
6311 (message-narrow-to-head-1)
6331 (with-output-to-temp-buffer "*Directory*"
6347 "Remove junk like \"Re:\", \"(fwd)\", etc. added to subject string SUBJECT.
6386 news, Source is the list of newsgroups is was posted to."
6404 the list of newsgroups is was posted to."
6429 (message-narrow-to-head-1)
6445 ;; func to the next one.
6459 Optional NEWS will use news to forward instead of mail.
6460 Optional DIGEST will use digest to forward."
6484 (mime-to-mml)
6494 (narrow-to-region b e)
6496 (narrow-to-region (point)
6500 (defun message-forward-make-body-mime (forward-buffer)
6504 (narrow-to-region (point) (point))
6505 (mml-insert-buffer forward-buffer)
6513 (defun message-forward-make-body-mml (forward-buffer)
6514 (insert "\n\n<#mml type=message/rfc822 disposition=inline>\n")
6524 (mime-to-mml)
6530 (narrow-to-region (point) (point))
6531 (mml-insert-buffer forward-buffer)
6537 (insert "<#/mml>\n")
6541 (narrow-to-region b e)
6543 (narrow-to-region (point)
6551 (mml-insert-buffer forward-buffer)
6556 (defun message-forward-make-body-digest-mime (forward-buffer)
6563 (narrow-to-region b e)
6565 (narrow-to-region (point)
6570 (if message-forward-as-mime
6571 (message-forward-make-body-digest-mime forward-buffer)
6583 (if message-forward-as-mime
6584 (if (and message-forward-show-mml
6585 (not (and (eq message-forward-show-mml 'best)
6591 (message-forward-make-body-mml forward-buffer)
6592 (message-forward-make-body-mime forward-buffer))
6606 (eval-when-compile (defvar rmail-enable-mime-composing))
6611 "Let RMAIL use message to forward."
6613 (setq rmail-enable-mime-composing t)
6614 (setq rmail-insert-mime-forwarded-message-function
6619 "Resend the current article to ADDRESS."
6621 (list (message-read-from-minibuffer "Resend message to: ")))
6622 (message "Resending message to %s..." address)
6635 (message-narrow-to-headers)
6638 ;; Rename them all to "Resent-*".
6647 ;; Insert the message to be resent.
6653 (narrow-to-region beg (point))
6671 (message "Resending message to %s...done" address)))
6677 contains some mail you have written which has been bounced back to
6682 (message-pop-to-buffer (message-buffer-name "bounce"))
6686 ;; This is a non-MIME bounce, so we try to remove things
6709 (message-narrow-to-head-1)
6720 (defun message-mail-other-window (&optional to subject)
6729 (message-pop-to-buffer (message-buffer-name "mail" to))))
6731 (message-setup `((To . ,(or to "")) (Subject . ,(or subject "")))
6732 nil nil nil 'switch-to-buffer-other-window)))
6735 (defun message-mail-other-frame (&optional to subject)
6744 (message-pop-to-buffer (message-buffer-name "mail" to))))
6746 (message-setup `((To . ,(or to "")) (Subject . ,(or subject "")))
6747 nil nil nil 'switch-to-buffer-other-frame)))
6751 "Start editing a news article to be sent."
6758 (message-pop-to-buffer (message-buffer-name "posting" nil newsgroups)))
6765 "Start editing a news article to be sent."
6772 (message-pop-to-buffer (message-buffer-name "posting" nil newsgroups)))
6779 ;; This code should be moved to underline.el (from which it is stolen).
6786 which specify the range to operate on."
6801 which specify the range to operate on."
6846 It can be either a list or a symbol refering to a list. See
6874 (mml-attach-file "attach" mml-mode-map)
6875 (mml-preview "mail/preview" mml-mode-map)
6876 ;; (mml-secure-message-sign-encrypt "lock" mml-mode-map :visible nil)
6879 (message-insert-disposition-notification-to "receipt" nil :visible nil)
6896 (mml-attach-file "attach" mml-mode-map)
6898 (mml-preview "preview" mml-mode-map)
6901 (message-insert-disposition-notification-to "gnus/receipt"))
6967 "*Function to execute when `message-tab' (TAB) is executed in the body.
6976 "Complete names according to `message-completion-alist'.
7005 (narrow-to-region
7034 (pop-to-buffer "*Completions*")
7060 (with-output-to-temp-buffer " *MESSAGE information message*"
7080 Then clone the local variables and values from the old buffer to the
7090 "Clone the local variables from BUFFER to the current buffer."
7121 (narrow-to-region (point) (point-max))
7122 (let ((new (mml-generate-mime)))
7133 (message-narrow-to-headers-or-head)
7140 (or mml-boundary
7143 (message-narrow-to-headers-or-head)
7170 "Set From field of the outgoing message to the first matching
7206 (message-narrow-to-headers-or-head)
7212 (let ((to (message-fetch-field "to"))
7216 (or to "")
7217 (if (and to cc) ", ")
7219 (if (and (or to cc) bcc) ", ")
7232 (message-narrow-to-headers)