]> git.notmuchmail.org Git - notmuch/blobdiff - emacs/notmuch-hello.el
emacs: Move declare-function from notmuch-lib.el to notmuch-hello.el.
[notmuch] / emacs / notmuch-hello.el
index 82a3a4b1d56602ba4465e165d9e3e9aa534bd554..e3132a9066e62d2fe2fd81c3e1457d5afb2b255e 100644 (file)
@@ -27,7 +27,7 @@
 (require 'notmuch-mua)
 
 (declare-function notmuch-search "notmuch" (query &optional oldest-first target-thread target-line continuation))
-(declare-function notmuch-folder-count "notmuch" (search))
+(declare-function notmuch-poll "notmuch" ())
 
 (defvar notmuch-hello-search-bar-marker nil
   "The position of the search bar within the notmuch-hello buffer.")
@@ -198,6 +198,12 @@ diagonal."
   (interactive)
   (notmuch-hello no-display))
 
+(defun notmuch-hello-poll-and-update ()
+  "Invoke `notmuch-poll' to import mail, then refresh the current view."
+  (interactive)
+  (notmuch-poll)
+  (notmuch-hello-update))
+
 (defun notmuch-hello (&optional no-display)
   (interactive)
 
@@ -386,6 +392,7 @@ diagonal."
 
       (use-local-map widget-keymap)
       (local-set-key "=" 'notmuch-hello-update)
+      (local-set-key "G" 'notmuch-hello-poll-and-update)
       (local-set-key "m" 'notmuch-mua-mail)
       (local-set-key "q" '(lambda () (interactive) (kill-buffer (current-buffer))))
       (local-set-key "s" 'notmuch-hello-goto-search)