[notmuch] [PATCH 2/2] notmuch.el: Add support for reply-to sender
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Thu, 3 Dec 2009 08:46:45 +0000 (14:16 +0530)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:35:48 +0000 (09:35 -0800)
b7/d7ed8f0c0f97f4435e67f2eb1bd4a2ac8ea015 [new file with mode: 0644]

diff --git a/b7/d7ed8f0c0f97f4435e67f2eb1bd4a2ac8ea015 b/b7/d7ed8f0c0f97f4435e67f2eb1bd4a2ac8ea015
new file mode 100644 (file)
index 0000000..0bd2e45
--- /dev/null
@@ -0,0 +1,112 @@
+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 A764F431FAE\r
+       for <notmuch@notmuchmail.org>; Thu,  3 Dec 2009 00:47:15 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\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 vpMB-IJzXCpE for <notmuch@notmuchmail.org>;\r
+       Thu,  3 Dec 2009 00:47:15 -0800 (PST)\r
+Received: from e28smtp06.in.ibm.com (e28smtp06.in.ibm.com [122.248.162.6])\r
+       by olra.theworths.org (Postfix) with ESMTP id F03D3431FBF\r
+       for <notmuch@notmuchmail.org>; Thu,  3 Dec 2009 00:47:14 -0800 (PST)\r
+Received: from d28relay01.in.ibm.com (d28relay01.in.ibm.com [9.184.220.58])\r
+       by e28smtp06.in.ibm.com (8.14.3/8.13.1) with ESMTP id nB38lDLP032182\r
+       for <notmuch@notmuchmail.org>; Thu, 3 Dec 2009 14:17:13 +0530\r
+Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63])\r
+       by d28relay01.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id\r
+       nB38lDQx2797748\r
+       for <notmuch@notmuchmail.org>; Thu, 3 Dec 2009 14:17:13 +0530\r
+Received: from d28av01.in.ibm.com (loopback [127.0.0.1])\r
+       by d28av01.in.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id\r
+       nB38lCop022263\r
+       for <notmuch@notmuchmail.org>; Thu, 3 Dec 2009 14:17:12 +0530\r
+Received: from localhost.localdomain ([9.77.193.32])\r
+       by d28av01.in.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id\r
+       nB38kmwB021218; Thu, 3 Dec 2009 14:17:03 +0530\r
+From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>\r
+To: cworth@cworth.org, aneesh.kumar@linux.vnet.ibm.com\r
+Date: Thu,  3 Dec 2009 14:16:45 +0530\r
+Message-Id: <1259830005-3439-2-git-send-email-aneesh.kumar@linux.vnet.ibm.com>\r
+X-Mailer: git-send-email 1.6.5.2.74.g610f9\r
+In-Reply-To:\r
+ <1259830005-3439-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com>\r
+References: <1259830005-3439-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com>\r
+Cc: "Aneesh Kumar K.V" <aneesh.kumar@gmail.com>, notmuch@notmuchmail.org\r
+Subject: [notmuch] [PATCH 2/2] notmuch.el: Add support for reply-to sender\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.12\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: Thu, 03 Dec 2009 08:47:15 -0000\r
+\r
+From: Aneesh Kumar K.V <aneesh.kumar@gmail.com>\r
+\r
+Add key binding to do a reply-to sender. This\r
+is mapped to 'R'\r
+\r
+Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com>\r
+---\r
+ notmuch.el |   24 ++++++++++++++++++++++--\r
+ 1 files changed, 22 insertions(+), 2 deletions(-)\r
+\r
+diff --git a/notmuch.el b/notmuch.el\r
+index bd8a6ce..c067e63 100644\r
+--- a/notmuch.el\r
++++ b/notmuch.el\r
+@@ -62,7 +62,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
+@@ -367,12 +368,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-format-reply (format-string query-string)\r
++  (switch-to-buffer (generate-new-buffer "notmuch-draft"))\r
++  (call-process notmuch-command nil t nil "reply" \r
++              (concat "--format=" format-string) 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-format-reply "sender-only" message-id)))\r
++\r
+ (defun notmuch-show-forward-current ()\r
+   "Forward the current message."\r
+   (interactive)\r
+-- \r
+1.6.5.2.74.g610f9\r
+\r