#3577: send-hook should not be executed if the mail is not going to be sent
-------------------------+--------------------------------------------------
 Reporter:  Y_Plentyn    |       Owner:  mutt-dev
     Type:  enhancement  |      Status:  new     
 Priority:  minor        |   Milestone:          
Component:  mutt         |     Version:          
 Keywords:               |  
-------------------------+--------------------------------------------------
 Forwarding from  http://bugs.debian.org/641457 :

 {{{
 I have a hook like this:

 send-hook '~s keyword' "push '<edit-subject><kill-line>Thank you<enter>'"

 The idea is that I want the subject to be automatically modified if it
 contains
 a specific keyword. This works well when you actually reply to the mail
 (or
 write a new mail).

 But if you exit the text editor without having done any change, the
 confirmation
 screen is not displayed but the "push" is still executed and the various
 letters
 end up executing multiple commands that should not have been executed
 because
 they were intended for the "Compose menu" and not the "Index menu".

 So the send-hook/send2-hook should really only be executed if the mail is
 going
 to be sent...

 And ideally if a reply is cancelled, a push recorded in a reply-hook
 should
 also be cancelled. Because my first try was to use a reply-hook for my
 need.
 :-)

 Cheers,
 }}}

-- 
Ticket URL: <http://dev.mutt.org/trac/ticket/3577>
Mutt <http://www.mutt.org/>
The Mutt mail user agent

Reply via email to