Add more information about wl-draft-reply-with*-argument-list.
authoryoichi <yoichi>
Sun, 24 Feb 2002 14:40:05 +0000 (14:40 +0000)
committeryoichi <yoichi>
Sun, 24 Feb 2002 14:40:05 +0000 (14:40 +0000)
doc/wl-ja.texi
doc/wl.texi

index 6c63019..bf81372 100644 (file)
@@ -6699,9 +6699,10 @@ face \e$B$N@_Dj$O\e(B @file{.emacs} \e$B$K=q$/$3$H$O$G$-$J$$$N$G\e(B @file{~/.wl} \e$
 @vindex wl-draft-reply-myself-with-argument-list
 @vindex wl-draft-reply-myself-without-argument-list
 
-\e$B%a!<%j%s%0%j%9%H$N5-;v$KJV;v$r=q$/$H$-$O!"%5%^%j%b!<%I$G\e(B @kbd{a} \e$B$r2!$7\e(B
-\e$B$?$@$1$G855-;v$N\e(B @samp{Reply-To:} \e$B$K$"$k%"%I%l%9$r\e(B @samp{To:} \e$B$KMQ0U$7$F\e(B
-\e$BM_$7$$!"$H$$$&>l9g$O0J2<$N$h$&$K$7$?$iNI$$$G$7$g$&!#\e(B
+\e$B%5%^%j%b!<%I$G\e(B @kbd{a} \e$B$r2!$9$HJV;vMQ$N%I%i%U%H$,MQ0U$5$l$^$9!#\e(B
+\e$BMQ0U$5$l$kAp9F$N08@h$O!"0J2<$N$h$&$K$7$F@_Dj$9$k$3$H$,$G$-$^$9!#\e(B
+
+\e$BNc$($P!"\e(B
 
 @lisp
 @group
@@ -6713,20 +6714,80 @@ face \e$B$N@_Dj$O\e(B @file{.emacs} \e$B$K=q$/$3$H$O$G$-$J$$$N$G\e(B @file{~/.wl} \e$
 @end group
 @end lisp
 
-@noindent
-(@samp{X-ML-Name:} \e$B%U%#!<%k%I5Z$S\e(B @samp{Reply-To:} \e$B%U%#!<%k%I$NN>J}$,85\e(B
-\e$B5-;v$KB8:_$9$k>l9g$@$1!"\e(B@samp{To:} \e$B$K855-;vCf$N\e(B @samp{Reply-To:} \e$B%U%#!<\e(B
-\e$B%k%I$,=`Hw$5$l$^$9!#\e(B)
+\e$B$N$h$&$K@_Dj$7$^$9!#$3$3$G%j%9%H\e(B @code{wl-draft-reply-without-argument-list}
+\e$B$N3FMWAG$O\e(B
+
+@example
+(key . (to-list cc-list newsgroup-list))
+@end example
+
+\e$B$H$J$C$F$*$j!"\e(B@samp{key} \e$B$G;XDj$7$?%U%#!<%k%I$,B8:_$9$k$H$-$K!"?F%a%C%;!<%8\e(B
+\e$B$N\e(B @samp{to-list} \e$B$G;XDj$5$l$k%X%C%@$r!"Ap9F$N\e(B @samp{To:} \e$B$K%3%T!<$7$^$9!#\e(B
+\e$B$^$?F1MM$K!"?F$N\e(B @samp{cc-list}, @samp{newsgroup-list} \e$B$OAp9F$N\e(B @samp{Cc:},
+@samp{Newsgroups:} \e$B$K%3%T!<$5$l$^$9!#\e(B
+
+\e$BNc$r5s$2$F@bL@$7$^$9!#\e(B
+
+@lisp
+("Mail-Followup-To" . (("Mail-Followup-To") nil ("Newsgroups")))
+@end lisp
+
+\e$B?F%a%C%;!<%8$K\e(B @samp{Mail-Followup-To} \e$B%U%#!<%k%I$,B8:_$7$?$H$-$K%^%C%A$7$^$9!#\e(B
+\e$B?F%a%C%;!<%8$N\e(B @samp{Mail-Followup-To} \e$B$*$h$S\e(B @samp{Newsgroups} 
+\e$B%U%#!<%k%I$NFbMF$r!"Ap9F$N\e(B @samp{To} \e$B$*$h$S\e(B @samp{Newsgroups} \e$B$K%3%T!<$7$^$9!#\e(B
+
+@lisp
+(("X-ML-Name" "Reply-To") . (("Reply-To") nil nil))
+@end lisp
+
+\e$B?F%a%C%;!<%8$K\e(B @samp{X-ML-Name} \e$B$*$h$S\e(B @samp{Reply-To} \e$B$NN>J}$,B8:_$7$?\e(B
+\e$B$H$-$K%^%C%A$7$^$9!#\e(B
+\e$B?F%a%C%;!<%8$N\e(B @samp{Reply-To} \e$B$rAp9F$N\e(B @samp{To} \e$B$K%3%T!<$7$^$9!#\e(B
 
-@c (\e$B:G8e$N9T$N0UL#$O!"%I%i%U%H$N\e(B @samp{To:} \e$B$K855-;vCf$N\e(B @samp{From:} \e$B%U%#!<\e(B
-@c \e$B%k%I$,!"%I%i%U%H$N\e(B @samp{Cc:} \e$B$K855-;v$N\e(B @samp{To:} \e$B%U%#!<%k%I$*$h$S\e(B 
-@c @samp{Cc:} \e$B%U%#!<%k%I!"$=$7$F\e(B @samp{Newsgroups:} \e$B$K855-;v$N\e(B c
-@c @samp{Newsgroups:} \e$B%U%#!<%k%I$,$=$l$>$l\e(B (\e$B$"$l$P\e(B) \e$B=`Hw$5$l$k$H$$$&$3$H$G\e(B
-@c \e$B$9!#\e(B)
+@lisp
+("From" . (("From") ("To" "Cc") ("Newsgroups")))
+@end lisp
+
+\e$B?F%a%C%;!<%8$N\e(B @samp{From} \e$B$rAp9F$N\e(B @samp{To} \e$B$K!"?F$N\e(B @samp{To} \e$B$*$h$S\e(B
+@samp{Cc} \e$B$rAp9F$N\e(B @samp{Cc} \e$B$K!"\e(B@samp{Newsgroups} \e$B$r\e(B @samp{Newsgroups}
+\e$B$K$=$l$>$l%3%T!<$7$^$9!#\e(B
+
+\e$B$3$l$i$O=gHV$KI>2A$5$l!":G=i$K%^%C%A$7$?$b$N$,;H$o$l$^$9!#\e(B
 
 \e$BF1MM$K$7$F!"\e(Bprefix argument \e$BIU$-$G\e(B  @kbd{a} \e$B$r2!$7$?$H$-$NF0:n$,!"\e(B
 @code{wl-draft-reply-with-argument-list} \e$B$G@_Dj$G$-$^$9!#\e(B
 
+
+\e$B$^$?!"4X?t\e(B(\e$B?F%a%C%;!<%8$N%P%C%U%!$GI>2A$5$l$k\e(B)\e$B$r\e(B @samp{key} \e$B$d\e(B
+@samp{to-list} \e$BEy$NJQ$o$j$KMQ$$$k$3$H$b$G$-$^$9!#\e(B
+\e$BNc$($P\e(B @kbd{C-u a} \e$B$7$?$H$-$K!"\e(B@code{wl-subscribed-mailing-list} \e$B$N\e(B
+\e$B%"%I%l%9$,4^$^$l$k%a!<%k$KBP$7$F$O%a!<%j%s%0%j%9%H$K$N$_JV?.$7$?$$>l9g!"\e(B
+\e$B<!$N$h$&$J@_Dj$,$G$-$^$9!#\e(B
+
+@lisp
+@group
+(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))))
+@end group
+@end lisp
+
+
 \e$BCm!'\e(B \e$B<+J,$,=P$7$?%a!<%k$KJV?.$9$k:]$NF0:n$O!"$=$l$i$KBe$o$C$F\e(B
 @code{wl-draft-reply-myself-without-argument-list},
 @code{wl-draft-reply-myself-with-argument-list}
index 3092b9c..51e92fb 100644 (file)
@@ -6794,10 +6794,10 @@ For silence, set to @code{nil}.
 @vindex wl-draft-reply-myself-with-argument-list
 @vindex wl-draft-reply-myself-without-argument-list
 
-If you want, when you replying to articles in mailing lists, the address
-in Reply-To field of the original message to be prepared to To field of
-the reply draft by simply pressing @kbd{a} in the summary mode, try the
-following settings:
+If you type @kbd{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:
 
 @lisp
 @group
@@ -6809,18 +6809,83 @@ following settings:
 @end group
 @end lisp
 
-@noindent
-(Only if there are both of @samp{X-ML-Name:} and @samp{Reply-To:} fields
-in the original message, @samp{Reply-To:} field in the original is
-copied to @samp{To:} field.)
+Where each element of the list  @code{wl-draft-reply-without-argument-list}
+is in the form
+
+@example
+(key . (to-list cc-list newsgroup-list))
+@end example
+
+and if the field designated by @samp{key} exist in the parent message,
+parent's field values designated by @samp{to-list} are copied to @samp{To:}
+in the draft. Similarly, parent's fields designated by @samp{cc-list} and
+@samp{newsgroup-list} are copied to @samp{Cc:} and @samp{Newsgroups:} in
+the draft respectively.
+
+Examples:
+
+@lisp
+("Mail-Followup-To" . (("Mail-Followup-To") nil ("Newsgroups")))
+@end lisp
+
+Match if the parent has @samp{Mail-Followup-To} field.
+The components of parent's @samp{Mail-Followup-To} and @samp{Newsgroups}
+fields are copied to @samp{To} and @samp{Newsgroups} in the draft
+respectively.
+
+@lisp
+(("X-ML-Name" "Reply-To") . (("Reply-To") nil nil))
+@end lisp
+
+Match if the parent has both @samp{X-ML-Name} and @samp{Reply-To} fields.
+Parent's @samp{Reply-To} is copied to @samp{To} in the draft.
+
+@lisp
+("From" . (("From") ("To" "Cc") ("Newsgroups")))
+@end lisp
+
+Copy parent's @samp{From} to @samp{To} in the draft, parent's @samp{To} and
+@samp{Cc} to @samp{Cc}, parent's @samp{Newsgroups} to @samp{Newsgroups}
+respectively.
+
+These are evaluated in order and first matched one is used.
 
 Moreover, the behavior of @kbd{a} with prefix argument can
 be directed by @code{wl-draft-reply-with-argument-list} as well.
 
-Note: To set the behavior when you reply to the message written by yourself, use
-@code{wl-draft-reply-myself-without-argument-list} and
-@code{wl-draft-reply-myself-with-argument-list}
-instead of them.
+By the way, you can use some function (will be evaluated in the parent
+message buffer) in the place of @samp{key} or @samp{to-list} etc.
+For example, if you only want to reply to mailing lists in
+@code{wl-subscribed-mailing-list} if the parent has some of them,
+set as follows:
+
+@lisp
+@group
+(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))))
+@end group
+@end lisp
+
+
+Note: To set the behavior when you reply to the message written by yourself,
+use @code{wl-draft-reply-myself-without-argument-list} and
+@code{wl-draft-reply-myself-with-argument-list} instead of them.
 
 @node Thread Format, User-Agent Field, Draft for Reply, Advanced Settings
 @subsection Appearance of Threads