Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 781144916B3 for ; Wed, 10 Mar 2010 08:31:53 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -3.97 X-Spam-Level: X-Spam-Status: No, score=-3.97 tagged_above=-999 required=5 tests=[AWL=0.215, BAYES_40=-0.185, RCVD_IN_DNSWL_MED=-4] autolearn=unavailable Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DhwyGNbeRZlZ for ; Wed, 10 Mar 2010 08:31:53 -0800 (PST) Received: from e23smtp02.au.ibm.com (e23smtp02.au.ibm.com [202.81.31.144]) by olra.theworths.org (Postfix) with ESMTP id D8CA549F16E for ; Wed, 10 Mar 2010 08:31:50 -0800 (PST) Received: from d23relay05.au.ibm.com (d23relay05.au.ibm.com [202.81.31.247]) by e23smtp02.au.ibm.com (8.14.3/8.13.1) with ESMTP id o2AGSILo019857 for ; Thu, 11 Mar 2010 03:28:18 +1100 Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay05.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o2AGPjGM1413302 for ; Thu, 11 Mar 2010 03:25:45 +1100 Received: from d23av04.au.ibm.com (loopback [127.0.0.1]) by d23av04.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id o2AGVVfU008244 for ; Thu, 11 Mar 2010 03:31:31 +1100 Received: from localhost.localdomain ([9.124.221.30]) by d23av04.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id o2AGVSYf008190; Thu, 11 Mar 2010 03:31:30 +1100 From: "Aneesh Kumar K.V" To: cworth@cworth.org Date: Wed, 10 Mar 2010 22:01:26 +0530 Message-Id: <1268238686-13605-2-git-send-email-aneesh.kumar@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.0.2.157.gb7e7f In-Reply-To: <87zl2hic7d.fsf@yoom.home.cworth.org> References: <87zl2hic7d.fsf@yoom.home.cworth.org> Cc: "Aneesh Kumar K.V" , notmuch@notmuchmail.org Subject: [notmuch] [PATCH -V3 2/2] notmuch.el: Add support for reply-to sender X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 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: Wed, 10 Mar 2010 16:31:53 -0000 From: Aneesh Kumar K.V Add key binding to do a reply-to sender. This is mapped to 'R' Signed-off-by: Aneesh Kumar K.V --- 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