]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: bind "s" to `notmuch-hello-search' in notmuch-hello buffer
authorDmitry Kurochkin <dmitry.kurochkin@gmail.com>
Wed, 25 Jan 2012 01:10:54 +0000 (05:10 +0400)
committerDavid Bremner <bremner@debian.org>
Wed, 25 Jan 2012 12:33:48 +0000 (08:33 -0400)
`notmuch-hello-search' uses `notmuch-search' function but refreshes
notmuch-hello buffer when the search buffer is closed.

emacs/notmuch-hello.el

index 6970bc343ad49582be7558746f5588711bfcea12..ab65e3699d3e78384b0dc42e381f0f858950c54c 100644 (file)
@@ -172,7 +172,8 @@ International Bureau of Weights and Measures."
       (match-string 1 search)
     search))
 
-(defun notmuch-hello-search (search)
+(defun notmuch-hello-search (&optional search)
+  (interactive)
   (unless (null search)
     (setq search (notmuch-hello-trim search))
     (let ((history-delete-duplicates t))
@@ -343,7 +344,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)