[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

13.7.1 Draft for Replay

If you type a in the Summary Buffer, a draft for reply is prepared. The addressee for the draft is decided by following rules.

For example, you can set as follows:

 
(setq wl-draft-reply-without-argument-list
      '(("Mail-Followup-To" . (("Mail-Followup-To") nil ("Newsgroups")))
        ("Followup-To" . (nil nil ("Followup-To")))
        (("X-ML-Name" "Reply-To") . (("Reply-To") nil nil))
        ("From" . (("From") ("To" "Cc") ("Newsgroups")))))

Where each element of the list wl-draft-reply-without-argument-list is in the form

 
(key . (to-list cc-list newsgroup-list))

and if the field designated by `key' exist in the parent message, parent's field values designated by `to-list' are copied to `To:' in the draft. Similarly, parent's fields designated by `cc-list' and `newsgroup-list' are copied to `Cc:' and `Newsgroups:' in the draft respectively.

Examples:

 
("Mail-Followup-To" . (("Mail-Followup-To") nil ("Newsgroups")))

Match if the parent has `Mail-Followup-To' field. The components of parent's `Mail-Followup-To' and `Newsgroups' fields are copied to `To' and `Newsgroups' in the draft respectively.

 
(("X-ML-Name" "Reply-To") . (("Reply-To") nil nil))

Match if the parent has both `X-ML-Name' and `Reply-To' fields. Parent's `Reply-To' is copied to `To' in the draft.

 
("From" . (("From") ("To" "Cc") ("Newsgroups")))

Copy parent's `From' to `To' in the draft, parent's `To' and `Cc' to `Cc', parent's `Newsgroups' to `Newsgroups' respectively.

These are evaluated in order and first matched one is used.

Moreover, the behavior of a with prefix argument can be directed by wl-draft-reply-with-argument-list as well.

By the way, you can use some function (will be evaluated in the parent message buffer) in the place of `key' or `to-list' etc.

If you want to write a rule for replying to message written by yourself, specify function wl-draft-self-reply-p as `key'.

If you only want to reply to mailing lists in wl-subscribed-mailing-list if the parent has some of them, set as follows:

 
(defun wl-mailing-list-addresses ()
  (let (list-addrs)
    (dolist (to (mapcar
		 (lambda (addr)
		   (nth 1 (std11-extract-address-components addr)))
		 (wl-parse-addresses
		  (wl-concat-list
		   (elmo-multiple-fields-body-list (list "To" "Cc"))
		   ","))))
      (when (elmo-string-matched-member to wl-subscribed-mailing-list t)
	(setq list-addrs (cons to list-addrs))))
    (nreverse list-addrs)))

(setq wl-draft-reply-with-argument-list
      '((wl-mailing-list-addresses . (wl-mailing-list-addresses nil nil))
	("Reply-To" . (("Reply-To") nil nil))
	("Mail-Reply-To" . (("Mail-Reply-To") nil nil))
	("From" . (("From") nil nil))))


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated by Yuuichi Teranishi on February, 19 2005 using texi2html