]> granicus.if.org Git - mutt/commitdiff
Document send2-hook.
authorThomas Roessler <roessler@does-not-exist.org>
Tue, 11 Jan 2005 12:15:13 +0000 (12:15 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Tue, 11 Jan 2005 12:15:13 +0000 (12:15 +0000)
doc/manual.sgml.head
doc/muttrc.man.head

index 70a3b78c59ac3aff54af96bec914631063595fc4..7b682322ebad00d8364429f0d2c807418453c347 100644 (file)
@@ -1389,10 +1389,11 @@ Usage: <tt/fcc-save-hook/ &lsqb;!&rsqb;<em/pattern/ <em/mailbox/
 This command is a shortcut, equivalent to doing both a <ref id="fcc-hook" name="fcc-hook">
 and a <ref id="save-hook" name="save-hook"> with its arguments.
 
-<sect1>Change settings based upon message recipients<label id="send-hook"><label id="reply-hook">
+<sect1>Change settings based upon message recipients<label id="send-hook"><label id="reply-hook"><label id="send2-hook">
 <p>
 Usage: <tt/reply-hook/ &lsqb;!&rsqb;<em/pattern/ <em/command/<newline>
-Usage: <tt/send-hook/ &lsqb;!&rsqb;<em/pattern/ <em/command/
+Usage: <tt/send-hook/ &lsqb;!&rsqb;<em/pattern/ <em/command/<newline>
+Usage: <tt/send2-hook/ &lsqb;!&rsqb;<em/pattern/ <em/command/
 
 These commands can be used to execute arbitrary configuration commands based
 upon recipients of the message.  <em/pattern/ is a regular expression
@@ -1405,7 +1406,14 @@ matched against all messages, both <em/new/ and <em/replies/.  <bf/Note:/
 <tt/reply-hook/s are matched <bf/before/ the <tt/send-hook/, <bf/regardless/
 of the order specified in the users's configuration file.
 
-For each type of <tt/send-hook/ or <tt/reply-hook/, When multiple matches
+<tt/send2-hook/ is matched every time a message is changed, either
+by editing it, or by using the compose menu to change its recipients
+or subject.  <tt/send2-hook/ is executed after <tt/send-hook/, and
+can, e.g., be used to set parameters such as the <ref id="sendmail"
+name="&dollar;sendmail"> variable depending on the message's sender
+address.
+
+For each type of <tt/send-hook/ or <tt/reply-hook/, when multiple matches
 occur, commands are executed in the order they are specified in the muttrc
 (for that type of hook).
 
index 03a9d880c999fec0622004404be3bce59615447c..a60ca056dce9eb23cc23bb5de11a3a6c76ed07a0 100644 (file)
@@ -292,6 +292,17 @@ When composing a message matching \fIpattern\fP, \fIcommand\fP is
 executed.  When multiple \fBsend-hook\fPs match, they are executed
 in the order in which they occur in the configuration file.
 .TP
+\fBsend2-hook\fP [\fB!\fP]\fIpattern\fP \fIcommand\fP
+Whenever a message matching \fIpattern\fP is changed (either by
+editing it or by using the compose menu), \fIcommand\fP
+is executed. When multiple \fBsend2-hook\fPs match, they are
+executed in the order in which they occur in the configuration file.
+Possible applications include setting the $sendmail variable when a
+message's from header is changed.
+.IP
+\fBsend2-hook\fP execution is not triggered by use of
+\fBenter-command\fP from the compose menu.
+.TP
 \fBcrypt-hook\fP \fIpattern\fP \fIkey-id\fP
 The crypt-hook command provides a method by which you can
 specify the ID of the public key to be used when encrypting messages