X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch.el;h=1fc54c305f92935b5328f8b625cfcafb432bc68f;hp=706e9f3299f60e57b33b630f5f65fd73f7d180ed;hb=1ddba66a3f4a7a118bc774d16cde00739144afcf;hpb=83a2ed3c2f301bf63a37cc091431db20321704e1 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.