--- /dev/null
+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 9B5B0431FBC\r
+ for <notmuch@notmuchmail.org>; Wed, 18 Nov 2009 22:11:03 -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 AEB7q4sH0JGN for <notmuch@notmuchmail.org>;\r
+ Wed, 18 Nov 2009 22:11:02 -0800 (PST)\r
+Received: from e23smtp04.au.ibm.com (e23smtp04.au.ibm.com [202.81.31.146])\r
+ by olra.theworths.org (Postfix) with ESMTP id 4939B431FAE\r
+ for <notmuch@notmuchmail.org>; Wed, 18 Nov 2009 22:11:02 -0800 (PST)\r
+Received: from d23relay05.au.ibm.com (d23relay05.au.ibm.com [202.81.31.247])\r
+ by e23smtp04.au.ibm.com (8.14.3/8.13.1) with ESMTP id nAJ67oWS006270\r
+ for <notmuch@notmuchmail.org>; Thu, 19 Nov 2009 17:07:50 +1100\r
+Received: from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.235.138])\r
+ by d23relay05.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id\r
+ nAJ67b5t1298602\r
+ for <notmuch@notmuchmail.org>; Thu, 19 Nov 2009 17:07:37 +1100\r
+Received: from d23av02.au.ibm.com (loopback [127.0.0.1])\r
+ by d23av02.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id\r
+ nAJ6AxE9031821\r
+ for <notmuch@notmuchmail.org>; Thu, 19 Nov 2009 17:11:00 +1100\r
+Received: from localhost.localdomain (N20wks267599wss.in.ibm.com\r
+ [9.124.31.111])\r
+ by d23av02.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id\r
+ nAJ6AvUh031796; Thu, 19 Nov 2009 17:10:58 +1100\r
+From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>\r
+To: notmuch@notmuchmail.org\r
+Date: Thu, 19 Nov 2009 11:40:54 +0530\r
+Message-Id: <1258611054-3888-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com>\r
+X-Mailer: git-send-email 1.6.5.2.74.g610f9\r
+Subject: [notmuch] [PATCH -V3] notmuch: Add search mode hook\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, 19 Nov 2009 06:11:03 -0000\r
+\r
+This patch add notmuch-search-hook that gets run when we\r
+after displaying search results\r
+\r
+\r
+Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>\r
+Cc:Keith Packard <keithp@keithp.com>\r
+\r
+---\r
+ notmuch.el | 12 +++++++++++-\r
+ 1 files changed, 11 insertions(+), 1 deletions(-)\r
+\r
+diff --git a/notmuch.el b/notmuch.el\r
+index 706e9f3..1fc54c3 100644\r
+--- a/notmuch.el\r
++++ b/notmuch.el\r
+@@ -654,6 +654,12 @@ view, (remove the \"inbox\" tag from each), with\r
+ :options '(goto-address)\r
+ :group 'notmuch)\r
+ \r
++(defcustom notmuch-search-hook nil\r
++ "List of functions to call when notmuch displays the search results."\r
++ :type 'hook\r
++ :options '(hl-line-mode)\r
++ :group 'notmuch)\r
++\r
+ ; Make show mode a bit prettier, highlighting URLs and using word wrap\r
+ \r
+ (defun notmuch-show-pretty-hook ()\r
+@@ -661,6 +667,9 @@ view, (remove the \"inbox\" tag from each), with\r
+ (visual-line-mode))\r
+ \r
+ (add-hook 'notmuch-show-hook 'notmuch-show-pretty-hook)\r
++(add-hook 'notmuch-search-hook\r
++ (lambda()\r
++ (hl-line-mode 1) ))\r
+ \r
+ (defun notmuch-show (thread-id &optional parent-buffer)\r
+ "Run \"notmuch show\" with the given thread ID and display results.\r
+@@ -911,7 +920,8 @@ This function advances point to the next line when finished."\r
+ (call-process "notmuch" nil t nil "search" "--sort=oldest-first" query)\r
+ (call-process "notmuch" nil t nil "search" "--sort=newest-first" query))\r
+ (notmuch-search-markup-thread-ids)\r
+- ))))\r
++ ))\r
++ (run-hooks 'notmuch-search-hook)))\r
+ \r
+ (defun notmuch-search-refresh-view ()\r
+ "Refresh the current view.\r
+-- \r
+1.6.5.2.74.g610f9\r
+\r