[notmuch] [PATCH -V2 2/2] notmuch.el: Add support for reply-to sender
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Sat, 23 Jan 2010 10:05:05 +0000 (15:35 +0530)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:36:01 +0000 (09:36 -0800)
10/1e99c66675c1a6f07507c5bf42623c64d98b44 [new file with mode: 0644]

diff --git a/10/1e99c66675c1a6f07507c5bf42623c64d98b44 b/10/1e99c66675c1a6f07507c5bf42623c64d98b44
new file mode 100644 (file)
index 0000000..4dabd5f
--- /dev/null
@@ -0,0 +1,118 @@
+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 2F5B9431FBC\r
+       for <notmuch@notmuchmail.org>; Sat, 23 Jan 2010 02:05:34 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -5.041\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-5.041 tagged_above=-999 required=5 tests=[AWL=1.558,\r
+       BAYES_00=-2.599, 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 N3MnJyoncBJr for <notmuch@notmuchmail.org>;\r
+       Sat, 23 Jan 2010 02:05:32 -0800 (PST)\r
+Received: from e23smtp08.au.ibm.com (e23smtp08.au.ibm.com [202.81.31.141])\r
+       by olra.theworths.org (Postfix) with ESMTP id 7A2EC431FBD\r
+       for <notmuch@notmuchmail.org>; Sat, 23 Jan 2010 02:05:31 -0800 (PST)\r
+Received: from d23relay04.au.ibm.com (d23relay04.au.ibm.com [202.81.31.246])\r
+       by e23smtp08.au.ibm.com (8.14.3/8.13.1) with ESMTP id o0NA5U0E021377\r
+       for <notmuch@notmuchmail.org>; Sat, 23 Jan 2010 21:05:30 +1100\r
+Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139])\r
+       by d23relay04.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id\r
+       o0NA0kcI1667130\r
+       for <notmuch@notmuchmail.org>; Sat, 23 Jan 2010 21:00:46 +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
+       o0NA5TXC007409\r
+       for <notmuch@notmuchmail.org>; Sat, 23 Jan 2010 21:05:29 +1100\r
+Received: from localhost.localdomain ([9.77.206.84])\r
+       by d23av04.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id\r
+       o0NA5J0g007294; Sat, 23 Jan 2010 21:05:24 +1100\r
+From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>\r
+To: cworth@cworth.org\r
+Date: Sat, 23 Jan 2010 15:35:05 +0530\r
+Message-Id: <1264241105-5983-2-git-send-email-aneesh.kumar@linux.vnet.ibm.com>\r
+X-Mailer: git-send-email 1.6.6.1.394.gdedc0\r
+In-Reply-To:\r
+ <1264241105-5983-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com>\r
+References: <1264241105-5983-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 -V2 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: Sat, 23 Jan 2010 10:05:34 -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 97914f2..5589350 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
+@@ -363,12 +364,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.6.1.394.gdedc0\r
+\r