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