[PATCH v3 3/3] emacs: bind "s" to `notmuch-hello-search' in notmuch-hello buffer

Subject: [PATCH v3 3/3] emacs: bind "s" to `notmuch-hello-search' in notmuch-hello buffer

Date: Tue, 24 Jan 2012 03:48:57 +0400

To: notmuch@notmuchmail.org

Cc:

From: Dmitry Kurochkin


`notmuch-hello-search' uses `notmuch-search' function but refreshes
notmuch-hello buffer when the search buffer is closed.
---
 emacs/notmuch-hello.el |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index 004287a..64011d4 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -166,7 +166,8 @@ International Bureau of Weights and Measures."
 	      (format "%s%03d" notmuch-hello-thousands-separator elem))
 	     (cdr result)))))
 
-(defun notmuch-hello-search (search)
+(defun notmuch-hello-search (&optional search)
+  (interactive)
   (notmuch-search search notmuch-search-oldest-first nil nil
 		  #'notmuch-hello-search-continuation))
 
@@ -333,7 +334,7 @@ should be. Returns a cons cell `(tags-per-line width)'."
     (define-key map "G" 'notmuch-hello-poll-and-update)
     (define-key map (kbd "<C-tab>") 'widget-backward)
     (define-key map "m" 'notmuch-mua-new-mail)
-    (define-key map "s" 'notmuch-search)
+    (define-key map "s" 'notmuch-hello-search)
     map)
   "Keymap for \"notmuch hello\" buffers.")
 (fset 'notmuch-hello-mode-map notmuch-hello-mode-map)
-- 
1.7.8.3


Thread: