aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Edmondson <dme@dme.org>2018-09-25 16:09:10 +0100
committerDavid Bremner <david@tethera.net>2018-09-28 20:22:42 -0300
commite8cb6b2cd63c9ea8a011cb9f672baf04b4c14f7b (patch)
tree11f454bf4c8930159c7084077c407fa6ef0e5369
parent4e213fe9b4332deb3f11f1dbc71cbdd47a8a1525 (diff)
emacs: Call `notmuch-mua-send-hook' hooks when sending a message
Previously any hook functions attached to `notmuch-mua-send-hook' were ignored.
-rw-r--r--emacs/notmuch-mua.el1
-rwxr-xr-xtest/T310-emacs.sh1
2 files changed, 1 insertions, 1 deletions
diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
index fc8ac687..df2ac447 100644
--- a/emacs/notmuch-mua.el
+++ b/emacs/notmuch-mua.el
@@ -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))
diff --git a/test/T310-emacs.sh b/test/T310-emacs.sh
index d743abb7..5935819f 100755
--- a/test/T310-emacs.sh
+++ b/test/T310-emacs.sh
@@ -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.' \