[PATCH 3/3] notmuch: Add support for listing the parent message
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Wed, 27 Oct 2010 17:26:57 +0000 (22:56 +0530)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:37:18 +0000 (09:37 -0800)
26/ac60a5bcdc428c518c56162f437fdfcfc633cd [new file with mode: 0644]

diff --git a/26/ac60a5bcdc428c518c56162f437fdfcfc633cd b/26/ac60a5bcdc428c518c56162f437fdfcfc633cd
new file mode 100644 (file)
index 0000000..6bcbfc7
--- /dev/null
@@ -0,0 +1,100 @@
+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 2C69840D157\r
+       for <notmuch@notmuchmail.org>; Wed, 27 Oct 2010 10:27:31 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -4.2\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-4.2 tagged_above=-999 required=5\r
+       tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3] 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 nq70tu+GAsBt for <notmuch@notmuchmail.org>;\r
+       Wed, 27 Oct 2010 10:27:18 -0700 (PDT)\r
+Received: from e23smtp06.au.ibm.com (e23smtp06.au.ibm.com [202.81.31.148])\r
+       (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 0F65140D160\r
+       for <notmuch@notmuchmail.org>; Wed, 27 Oct 2010 10:27:08 -0700 (PDT)\r
+Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [202.81.31.245])\r
+       by e23smtp06.au.ibm.com (8.14.4/8.13.1) with ESMTP id o9RHQuZk013102\r
+       for <notmuch@notmuchmail.org>; Thu, 28 Oct 2010 04:26:56 +1100\r
+Received: from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.235.138])\r
+       by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id\r
+       o9RHR4Yn1093864\r
+       for <notmuch@notmuchmail.org>; Thu, 28 Oct 2010 04:27:04 +1100\r
+Received: from d23av02.au.ibm.com (loopback [127.0.0.1])\r
+       by d23av02.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id\r
+       o9RHR4Ki031520\r
+       for <notmuch@notmuchmail.org>; Thu, 28 Oct 2010 04:27:04 +1100\r
+Received: from skywalker.in.ibm.com ([9.77.207.27])\r
+       by d23av02.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id\r
+       o9RHQxk7031146; Thu, 28 Oct 2010 04:27:03 +1100\r
+From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>\r
+To: cworth@cworth.org\r
+Subject: [PATCH 3/3] notmuch: Add support for listing the parent message\r
+Date: Wed, 27 Oct 2010 22:56:57 +0530\r
+Message-Id: <1288200417-6584-3-git-send-email-aneesh.kumar@linux.vnet.ibm.com>\r
+X-Mailer: git-send-email 1.7.1\r
+In-Reply-To:\r
+ <1288200417-6584-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com>\r
+References: <1288200417-6584-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com>\r
+Cc: "Aneesh Kumar K.V" <aneesh.kumar@gmail.com>, notmuch@notmuchmail.org\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, 27 Oct 2010 17:27:31 -0000\r
+\r
+From: Aneesh Kumar K.V <aneesh.kumar@gmail.com>\r
+\r
+When you have long thread, it would be nice to be able to\r
+show the message to which the current message is a reply\r
+\r
+Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com>\r
+---\r
+ emacs/notmuch-show.el |   12 ++++++++++++\r
+ 1 files changed, 12 insertions(+), 0 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
+index 3fc3787..139c44d 100644\r
+--- a/emacs/notmuch-show.el\r
++++ b/emacs/notmuch-show.el\r
+@@ -582,6 +582,7 @@ function is used. "\r
+       (define-key map " " 'notmuch-show-advance-and-archive)\r
+       (define-key map (kbd "M-RET") 'notmuch-show-open-or-close-all)\r
+       (define-key map (kbd "RET") 'notmuch-show-toggle-message)\r
++      (define-key map "A" 'notmuch-show-search-parent)\r
+       map)\r
+       "Keymap for \"notmuch show\" buffers.")\r
+ (fset 'notmuch-show-mode-map notmuch-show-mode-map)\r
+@@ -1095,4 +1096,15 @@ buffer."\r
\r
+ ;;\r
\r
++(defun notmuch-show-get-parent ()\r
++  (let ((id (notmuch-show-get-header :In-Reply-To)))\r
++    (if (string-match "^<\\(.*\\)>$" id)\r
++      (match-string 1 id)\r
++      id)))\r
++\r
++(defun notmuch-show-search-parent ()\r
++  "Search parent message"\r
++  (interactive)\r
++  (notmuch-search (concat "id:\"" (notmuch-show-get-parent) "\"")))\r
++\r
+ (provide 'notmuch-show)\r
+-- \r
+1.7.1\r
+\r