From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 9F04E6DE024E for ; Tue, 25 Sep 2018 08:09:18 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.402 X-Spam-Level: X-Spam-Status: No, score=0.402 tagged_above=-999 required=5 tests=[AWL=-0.251, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_NEUTRAL=0.652, UNPARSEABLE_RELAY=0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oPtbds5is99O for ; Tue, 25 Sep 2018 08:09:17 -0700 (PDT) Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by arlo.cworth.org (Postfix) with ESMTPS id 529B16DE01E0 for ; Tue, 25 Sep 2018 08:09:17 -0700 (PDT) Received: by mail-wr1-f42.google.com with SMTP id z14-v6so6250876wrs.10 for ; Tue, 25 Sep 2018 08:09:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dme-org.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=R88sTiy8afwB6ny1baa0OyiOFyu0a+cHfPTLTgi1eY0=; b=VQ6AnHL2vfUpYOcfWIJaRP/IFFsgvXNjJcI5dPnZtQ9EO45fMqziFrqByyfLgWyeES R9gxiZ8SRifpNqlqV3Liksh4znmBWPGx6A5iryp0PrUvwLkjxhlLXvPb/O9yMwtbaygW CsjO9yIjfGZkOqqy06dBfVGOEoAr5Li4Jxe7f5SpkNXRbKwo+YOVz3RN9mw9J97t9Nb1 1T1ReSCadZpVzZDc82oowLxOkZswlbc7tf3+s0aWU+Sf26Uysnp/Bm7je24md4cqkftl rrBxidNskdnjWZJ5jnUQ3aSiUMqyT/ypYwgltv/ULnVCDLg+LLXqH/1xib1xI1tysr0N GZMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=R88sTiy8afwB6ny1baa0OyiOFyu0a+cHfPTLTgi1eY0=; b=pyjVK1iPMYPz1vfEEPFgK6/xo0BB9/uhnidvWbi3HI8jOQJmjKdTHOZf9DjJ1/CQhX ZS8nA9mhn0RlSvjHAqKeF9uQFTfl68Ki3dd4j/StKbVZ4V9KDD5MZqWTuFHSeIwgBxUt BOVcPyHIY7InuWyvSCUhY86WiJ5shiUiuEiS9x53NX0jEptaGaz5buQHnXN2igkcp+cg h7cT8TaJ1MoNv06U//qX57xX0gBuVV8VLauE20k3CcercFvIQuoE8scLc9vkYYqjlaMx xRfZzhfnx6/R5J/MnlsMG9fwy/CYY/+TBGv00xpGLBRhQ4fU0U8wPPUVOhxxhIK0Y4lE pR5Q== X-Gm-Message-State: ABuFfojzPhhXwF+/CnWvZSZyOQY2d4PKUy3ratPry6PH3bIER6iqOWSO aUIC/LfvJVNFpPsBv+PGN/LegoQI0ve81Q== X-Google-Smtp-Source: ACcGV62+h2GmLJKA4Wysw9gZMd1ymHOmw8PMnCzmXTlmXV/QEsEjsF/cfTKNHWQsxtkHjTrxKv1JMg== X-Received: by 2002:adf:8288:: with SMTP id 8-v6mr1357931wrc.252.1537888155044; Tue, 25 Sep 2018 08:09:15 -0700 (PDT) Received: from disaster-area.hh.sledj.net (disaster-area.hh.sledj.net. [81.149.164.25]) by smtp.gmail.com with ESMTPSA id x204-v6sm2444858wmg.27.2018.09.25.08.09.14 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Sep 2018 08:09:14 -0700 (PDT) Received: from localhost (disaster-area.hh.sledj.net [local]) by disaster-area.hh.sledj.net (OpenSMTPD) with ESMTPA id 4145b281 for ; Tue, 25 Sep 2018 15:09:11 +0000 (UTC) From: David Edmondson To: notmuch@notmuchmail.org Subject: [PATCH v1 2/2] emacs: Call `notmuch-mua-send-hook' hooks when sending a message Date: Tue, 25 Sep 2018 16:09:10 +0100 Message-Id: <20180925150910.22318-3-dme@dme.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180925150910.22318-1-dme@dme.org> References: <20180925150910.22318-1-dme@dme.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Sep 2018 15:09:18 -0000 Previously any hook functions attached to `notmuch-mua-send-hook' were ignored. --- emacs/notmuch-mua.el | 1 + test/T310-emacs.sh | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) 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.' \ -- 2.19.0