[notmuch] [PATCH -V3 2/2] notmuch.el: Add support for reply-to sender
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Wed, 10 Mar 2010 16:31:26 +0000 (22:01 +0530)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:36:21 +0000 (09:36 -0800)
e8/cade4682e3b48ce390e26b1e2661a79c8670ad [new file with mode: 0644]

diff --git a/e8/cade4682e3b48ce390e26b1e2661a79c8670ad b/e8/cade4682e3b48ce390e26b1e2661a79c8670ad
new file mode 100644 (file)
index 0000000..f476acb
--- /dev/null
@@ -0,0 +1,117 @@
+Return-Path: <aneesh.kumar@linux.vnet.ibm.com>\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 781144916B3\r
+       for <notmuch@notmuchmail.org>; Wed, 10 Mar 2010 08:31:53 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -3.97\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-3.97 tagged_above=-999 required=5 tests=[AWL=0.215, \r
+       BAYES_40=-0.185, RCVD_IN_DNSWL_MED=-4] autolearn=unavailable\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 DhwyGNbeRZlZ for <notmuch@notmuchmail.org>;\r
+       Wed, 10 Mar 2010 08:31:53 -0800 (PST)\r
+Received: from e23smtp02.au.ibm.com (e23smtp02.au.ibm.com [202.81.31.144])\r
+       by olra.theworths.org (Postfix) with ESMTP id D8CA549F16E\r
+       for <notmuch@notmuchmail.org>; Wed, 10 Mar 2010 08:31:50 -0800 (PST)\r
+Received: from d23relay05.au.ibm.com (d23relay05.au.ibm.com [202.81.31.247])\r
+       by e23smtp02.au.ibm.com (8.14.3/8.13.1) with ESMTP id o2AGSILo019857\r
+       for <notmuch@notmuchmail.org>; Thu, 11 Mar 2010 03:28:18 +1100\r
+Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139])\r
+       by d23relay05.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id\r
+       o2AGPjGM1413302\r
+       for <notmuch@notmuchmail.org>; Thu, 11 Mar 2010 03:25:45 +1100\r
+Received: from d23av04.au.ibm.com (loopback [127.0.0.1])\r
+       by d23av04.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id\r
+       o2AGVVfU008244\r
+       for <notmuch@notmuchmail.org>; Thu, 11 Mar 2010 03:31:31 +1100\r
+Received: from localhost.localdomain ([9.124.221.30])\r
+       by d23av04.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id\r
+       o2AGVSYf008190; Thu, 11 Mar 2010 03:31:30 +1100\r
+From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>\r
+To: cworth@cworth.org\r
+Date: Wed, 10 Mar 2010 22:01:26 +0530\r
+Message-Id:\r
+ <1268238686-13605-2-git-send-email-aneesh.kumar@linux.vnet.ibm.com>\r
+X-Mailer: git-send-email 1.7.0.2.157.gb7e7f\r
+In-Reply-To: <87zl2hic7d.fsf@yoom.home.cworth.org>\r
+References: <87zl2hic7d.fsf@yoom.home.cworth.org>\r
+Cc: "Aneesh Kumar K.V" <aneesh.kumar@gmail.com>, notmuch@notmuchmail.org\r
+Subject: [notmuch] [PATCH -V3 2/2] notmuch.el: Add support for reply-to\r
+       sender\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: Wed, 10 Mar 2010 16:31:53 -0000\r
+\r
+From: Aneesh Kumar K.V <aneesh.kumar@gmail.com>\r
+\r
+Add key binding to do a reply-to sender. This is mapped to 'R'\r
+\r
+Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com>\r
+---\r
+ emacs/notmuch.el |   24 ++++++++++++++++++++++--\r
+ 1 files changed, 22 insertions(+), 2 deletions(-)\r
+\r
+diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
+index 5b553bb..9ba1ec1 100644\r
+--- a/emacs/notmuch.el\r
++++ b/emacs/notmuch.el\r
+@@ -78,7 +78,8 @@\r
+     (define-key map "s" 'notmuch-search)\r
+     (define-key map "m" 'message-mail)\r
+     (define-key map "f" 'notmuch-show-forward-current)\r
+-    (define-key map "r" 'notmuch-show-reply)\r
++    (define-key map "r" 'notmuch-show-reply-all)\r
++    (define-key map "R" 'notmuch-show-reply)\r
+     (define-key map "|" 'notmuch-show-pipe-message)\r
+     (define-key map "w" 'notmuch-show-save-attachments)\r
+     (define-key map "V" 'notmuch-show-view-raw-message)\r
+@@ -446,12 +447,31 @@ buffer."\r
+       (forward-line)))\r
+   (message-mode))\r
\r
+-(defun notmuch-show-reply ()\r
++(defun notmuch-show-reply-all ()\r
+   "Begin composing a reply to the current message in a new buffer."\r
+   (interactive)\r
+   (let ((message-id (notmuch-show-get-message-id)))\r
+     (notmuch-reply message-id)))\r
\r
++\r
++(defun notmuch-recipient-reply (recipient query-string)\r
++  (switch-to-buffer (generate-new-buffer "notmuch-draft"))\r
++  (call-process notmuch-command nil t nil "reply"\r
++              (concat "--recipient=" recipient) query-string)\r
++  (message-insert-signature)\r
++  (goto-char (point-min))\r
++  (if (re-search-forward "^$" nil t)\r
++      (progn\r
++      (insert "--text follows this line--")\r
++      (forward-line)))\r
++  (message-mode))\r
++\r
++(defun notmuch-show-reply ()\r
++  "Begin composing a reply to the current message in a new buffer."\r
++  (interactive)\r
++  (let ((message-id (notmuch-show-get-message-id)))\r
++    (notmuch-recipient-reply "sender" message-id)))\r
++\r
+ (defun notmuch-show-forward-current ()\r
+   "Forward the current message."\r
+   (interactive)\r
+-- \r
+1.7.0.2.157.gb7e7f\r
+\r