[PATCH] emacs: run notmuch-message-mark-replied on message-sent-hook, not message...
authorPieter Praet <pieter@praet.org>
Fri, 13 May 2011 08:34:12 +0000 (10:34 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:38:15 +0000 (09:38 -0800)
f3/5620241e314c3c31e91fcb91b87bc4806e75a8 [new file with mode: 0644]

diff --git a/f3/5620241e314c3c31e91fcb91b87bc4806e75a8 b/f3/5620241e314c3c31e91fcb91b87bc4806e75a8
new file mode 100644 (file)
index 0000000..fbb095e
--- /dev/null
@@ -0,0 +1,82 @@
+Return-Path: <pieter@praet.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 57B0A431FD0\r
+       for <notmuch@notmuchmail.org>; Fri, 13 May 2011 01:34:21 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id v666sFN3EZ3h for <notmuch@notmuchmail.org>;\r
+       Fri, 13 May 2011 01:34:20 -0700 (PDT)\r
+Received: from mail-ww0-f41.google.com (mail-ww0-f41.google.com\r
+ [74.125.82.41])       (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
+ certificate requested)        by olra.theworths.org (Postfix) with ESMTPS id\r
+ AA708431FB6   for <notmuch@notmuchmail.org>; Fri, 13 May 2011 01:34:20 -0700\r
+ (PDT)\r
+Received: by wwi18 with SMTP id 18so398535wwi.2\r
+       for <notmuch@notmuchmail.org>; Fri, 13 May 2011 01:34:19 -0700 (PDT)\r
+Received: by 10.216.145.206 with SMTP id p56mr41444wej.80.1305275659145;\r
+       Fri, 13 May 2011 01:34:19 -0700 (PDT)\r
+Received: from localhost (54.209-242-81.adsl-dyn.isp.belgacom.be\r
+       [81.242.209.54])\r
+       by mx.google.com with ESMTPS id d54sm1011306wej.10.2011.05.13.01.34.17\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Fri, 13 May 2011 01:34:18 -0700 (PDT)\r
+From: Pieter Praet <pieter@praet.org>\r
+To: Notmuch Mail <notmuch@notmuchmail.org>\r
+Subject: [PATCH] emacs: run notmuch-message-mark-replied on message-sent-hook,\r
+       not message-send-hook\r
+Date: Fri, 13 May 2011 10:34:12 +0200\r
+Message-Id: <1305275652-22956-1-git-send-email-pieter@praet.org>\r
+X-Mailer: git-send-email 1.7.4.1\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 13 May 2011 08:34:21 -0000\r
+\r
+Parent message is tagged "replied" prematurely.\r
+\r
+Only do so when reply is *really* sent.\r
+\r
+(describe-variable 'message-send-hook)\r
+> Hook run before sending messages.\r
+> This hook is run quite early when sending.\r
+\r
+(describe-variable 'message-sent-hook)\r
+> Hook run after sending messages.\r
+\r
+Signed-off-by: Pieter Praet <pieter@praet.org>\r
+---\r
+ emacs/notmuch-message.el |    2 +-\r
+ 1 files changed, 1 insertions(+), 1 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-message.el b/emacs/notmuch-message.el\r
+index d5c96c2..c8b19c3 100644\r
+--- a/emacs/notmuch-message.el\r
++++ b/emacs/notmuch-message.el\r
+@@ -47,6 +47,6 @@ the \"inbox\" and \"todo\", you would set\r
+       (apply 'notmuch-call-notmuch-process "tag"\r
+              (append tags (list (concat "id:" (car (car rep)))) nil))))))\r
\r
+-(add-hook 'message-send-hook 'notmuch-message-mark-replied)\r
++(add-hook 'message-sent-hook 'notmuch-message-mark-replied)\r
\r
+ (provide 'notmuch-message)\r
+-- \r
+1.7.4.1\r
+\r