From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: cworth@cworth.org
Cc: "Aneesh Kumar K.V" <aneesh.kumar@gmail.com>, notmuch@notmuchmail.org
Subject: [PATCH -V3 2/2] notmuch.el: Add support for reply-to sender
Date: Wed, 10 Mar 2010 22:01:26 +0530 [thread overview]
Message-ID: <1268238686-13605-2-git-send-email-aneesh.kumar@linux.vnet.ibm.com> (raw)
In-Reply-To: <87zl2hic7d.fsf@yoom.home.cworth.org>
From: Aneesh Kumar K.V <aneesh.kumar@gmail.com>
Add key binding to do a reply-to sender. This is mapped to 'R'
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com>
---
emacs/notmuch.el | 24 ++++++++++++++++++++++--
1 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index 5b553bb..9ba1ec1 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -78,7 +78,8 @@
(define-key map "s" 'notmuch-search)
(define-key map "m" 'message-mail)
(define-key map "f" 'notmuch-show-forward-current)
- (define-key map "r" 'notmuch-show-reply)
+ (define-key map "r" 'notmuch-show-reply-all)
+ (define-key map "R" 'notmuch-show-reply)
(define-key map "|" 'notmuch-show-pipe-message)
(define-key map "w" 'notmuch-show-save-attachments)
(define-key map "V" 'notmuch-show-view-raw-message)
@@ -446,12 +447,31 @@ buffer."
(forward-line)))
(message-mode))
-(defun notmuch-show-reply ()
+(defun notmuch-show-reply-all ()
"Begin composing a reply to the current message in a new buffer."
(interactive)
(let ((message-id (notmuch-show-get-message-id)))
(notmuch-reply message-id)))
+
+(defun notmuch-recipient-reply (recipient query-string)
+ (switch-to-buffer (generate-new-buffer "notmuch-draft"))
+ (call-process notmuch-command nil t nil "reply"
+ (concat "--recipient=" recipient) query-string)
+ (message-insert-signature)
+ (goto-char (point-min))
+ (if (re-search-forward "^$" nil t)
+ (progn
+ (insert "--text follows this line--")
+ (forward-line)))
+ (message-mode))
+
+(defun notmuch-show-reply ()
+ "Begin composing a reply to the current message in a new buffer."
+ (interactive)
+ (let ((message-id (notmuch-show-get-message-id)))
+ (notmuch-recipient-reply "sender" message-id)))
+
(defun notmuch-show-forward-current ()
"Forward the current message."
(interactive)
--
1.7.0.2.157.gb7e7f
next prev parent reply other threads:[~2010-03-10 16:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-03 8:46 [PATCH 1/2] notmuch-reply: Add support for replying only to sender Aneesh Kumar K.V
2009-12-03 8:46 ` [PATCH 2/2] notmuch.el: Add support for reply-to sender Aneesh Kumar K.V
2009-12-04 19:07 ` [PATCH 1/2] notmuch-reply: Add support for replying only to sender Carl Worth
2009-12-04 19:21 ` Jed Brown
2009-12-11 5:31 ` Aneesh Kumar K. V
2010-03-09 18:25 ` Carl Worth
2010-03-10 16:31 ` [PATCH -V3 " Aneesh Kumar K.V
2010-03-11 12:45 ` Michal Sojka
2010-03-10 16:31 ` Aneesh Kumar K.V [this message]
2009-12-05 9:37 ` [PATCH -V2] " Aneesh Kumar K.V
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=1268238686-13605-2-git-send-email-aneesh.kumar@linux.vnet.ibm.com \
--to=aneesh.kumar@linux.vnet.ibm.com \
--cc=aneesh.kumar@gmail.com \
--cc=cworth@cworth.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).