]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: Call `notmuch-mua-send-hook' hooks when sending a message
authorDavid Edmondson <dme@dme.org>
Tue, 25 Sep 2018 15:09:10 +0000 (16:09 +0100)
committerDavid Bremner <david@tethera.net>
Fri, 28 Sep 2018 23:22:42 +0000 (20:22 -0300)
Previously any hook functions attached to `notmuch-mua-send-hook' were
ignored.

emacs/notmuch-mua.el
test/T310-emacs.sh

index fc8ac687e8208b64d95c9032e7e3e22ea989e5ca..df2ac4470f5200fcfb183f5c1cf01c5c84a15c24 100644 (file)
@@ -543,6 +543,7 @@ unencrypted.  Really send? "))))
 
 (defun notmuch-mua-send-common (arg &optional exit)
   (interactive "P")
+  (run-hooks 'notmuch-mua-send-hook)
   (when (and (notmuch-mua-check-no-misplaced-secure-tag)
             (notmuch-mua-check-secure-tag-has-newline))
     (letf (((symbol-function 'message-do-fcc) #'notmuch-maildir-message-do-fcc))
index d743abb75211657e9a635acc1cc886c7b9815d4e..5935819f4ba4404eb14802d921ff88c3cd2ea1db 100755 (executable)
@@ -1107,7 +1107,6 @@ output=$(test_emacs "(mapcar 'notmuch-escape-boolean-term (list
 test_expect_equal "$output" '("\"\"" "abc`~!@#$%^&*-=_+123" "\"(abc\"" "\")abc\"" "\"\"\"abc\"" "\"'$'\x01''xyz\"" "\"“xyz”\"")'
 
 test_begin_subtest "Sending a message calls the send message hooks"
-test_subtest_known_broken
 emacs_deliver_message \
     'Testing message sending hooks' \
     'This is a test of the message sending hooks.' \