[PATCH] emacs: add notmuch-hello-refresh-hook

Thomas Jost schnouki at schnouki.net
Tue Dec 20 17:28:14 PST 2011


This hook is called every time a notmuch-hello buffer is updated.
---
Oops, the previous patch had a typo which prevented it to work (":group notmuch"
instead of ":group 'notmuch"). Sorry about that.

 emacs/notmuch-hello.el |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index 115f80a..a2b1c4c 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -143,6 +143,11 @@ Typically \",\" in the US and UK and \".\" or \" \" in Europe."
   :group 'notmuch
   :type 'hook)
 
+(defcustom notmuch-hello-refresh-hook nil
+  "Functions called after updating a `notmuch-hello' buffer."
+  :type 'hook
+  :group 'notmuch)
+
 (defvar notmuch-hello-url "http://notmuchmail.org"
   "The `notmuch' web site.")
 
@@ -590,7 +595,9 @@ Complete list of currently available key bindings:
 	  (widget-forward 1)))
 
       (unless (widget-at)
-	(notmuch-hello-goto-search)))))
+	(notmuch-hello-goto-search))))
+
+  (run-hooks 'notmuch-hello-refresh-hook))
 
 (defun notmuch-folder ()
   "Deprecated function for invoking notmuch---calling `notmuch' is preferred now."
-- 
1.7.8



More information about the notmuch mailing list