unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Pieter Praet <pieter@praet.org>
To: Notmuch Mail <notmuch@notmuchmail.org>
Subject: [PATCH] emacs: run notmuch-message-mark-replied on message-sent-hook, not message-send-hook
Date: Fri, 13 May 2011 10:34:12 +0200	[thread overview]
Message-ID: <1305275652-22956-1-git-send-email-pieter@praet.org> (raw)

Parent message is tagged "replied" prematurely.

Only do so when reply is *really* sent.

(describe-variable 'message-send-hook)
> Hook run before sending messages.
> This hook is run quite early when sending.

(describe-variable 'message-sent-hook)
> Hook run after sending messages.

Signed-off-by: Pieter Praet <pieter@praet.org>
---
 emacs/notmuch-message.el |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/emacs/notmuch-message.el b/emacs/notmuch-message.el
index d5c96c2..c8b19c3 100644
--- a/emacs/notmuch-message.el
+++ b/emacs/notmuch-message.el
@@ -47,6 +47,6 @@ the \"inbox\" and \"todo\", you would set
 	(apply 'notmuch-call-notmuch-process "tag"
 	       (append tags (list (concat "id:" (car (car rep)))) nil))))))
 
-(add-hook 'message-send-hook 'notmuch-message-mark-replied)
+(add-hook 'message-sent-hook 'notmuch-message-mark-replied)
 
 (provide 'notmuch-message)
-- 
1.7.4.1

             reply	other threads:[~2011-05-13  8:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-13  8:34 Pieter Praet [this message]
2011-05-13 15:07 ` [PATCH 1/3] test: emacs: add subtest "Send reply from within Emacs" Pieter Praet
2011-05-13 15:07   ` [PATCH 2/3] test: emacs: add subtest "Verify that 'replied' tag is added to reply's parent message." Pieter Praet
2011-05-13 15:07   ` [PATCH 3/3] emacs: generalize notmuch-message-mark-replied Pieter Praet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1305275652-22956-1-git-send-email-pieter@praet.org \
    --to=pieter@praet.org \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).