aboutsummaryrefslogtreecommitdiffhomepage
path: root/notmuch.el
diff options
context:
space:
mode:
authorGravatar Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2009-11-19 11:40:54 +0530
committerGravatar Carl Worth <cworth@cworth.org>2009-11-19 14:01:49 +0100
commit3f52f59c1e5ae677ee67969aacb6381f79e42303 (patch)
treefa665f79cf3152a68d3160702079394f636a39bb /notmuch.el
parentaa8c2224eeef5d84c040c8f547336e76efdc9ac1 (diff)
notmuch: Add search mode hook
This patch add notmuch-search-hook that gets run when we after displaying search results Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Cc:Keith Packard <keithp@keithp.com>
Diffstat (limited to 'notmuch.el')
-rw-r--r--notmuch.el12
1 files changed, 11 insertions, 1 deletions
diff --git a/notmuch.el b/notmuch.el
index 706e9f32..1fc54c30 100644
--- a/notmuch.el
+++ b/notmuch.el
@@ -654,6 +654,12 @@ view, (remove the \"inbox\" tag from each), with
:options '(goto-address)
:group 'notmuch)
+(defcustom notmuch-search-hook nil
+ "List of functions to call when notmuch displays the search results."
+ :type 'hook
+ :options '(hl-line-mode)
+ :group 'notmuch)
+
; Make show mode a bit prettier, highlighting URLs and using word wrap
(defun notmuch-show-pretty-hook ()
@@ -661,6 +667,9 @@ view, (remove the \"inbox\" tag from each), with
(visual-line-mode))
(add-hook 'notmuch-show-hook 'notmuch-show-pretty-hook)
+(add-hook 'notmuch-search-hook
+ (lambda()
+ (hl-line-mode 1) ))
(defun notmuch-show (thread-id &optional parent-buffer)
"Run \"notmuch show\" with the given thread ID and display results.
@@ -911,7 +920,8 @@ This function advances point to the next line when finished."
(call-process "notmuch" nil t nil "search" "--sort=oldest-first" query)
(call-process "notmuch" nil t nil "search" "--sort=newest-first" query))
(notmuch-search-markup-thread-ids)
- ))))
+ ))
+ (run-hooks 'notmuch-search-hook)))
(defun notmuch-search-refresh-view ()
"Refresh the current view.