]> git.notmuchmail.org Git - notmuch/commitdiff
notmuch-hello: Add a 'G' keybinding.
authorCarl Worth <cworth@cworth.org>
Tue, 27 Apr 2010 05:05:47 +0000 (22:05 -0700)
committerCarl Worth <cworth@cworth.org>
Tue, 27 Apr 2010 05:05:47 +0000 (22:05 -0700)
Just like the G keybinding we've had in notmuch-folder-mode and
notmuch-search-mode, (to call `notmuch-poll' to 'G'et new mail).

emacs/notmuch-hello.el
emacs/notmuch-lib.el

index 82a3a4b1d56602ba4465e165d9e3e9aa534bd554..97db90e51a24875c17184363f0d2cfc03c2f0c92 100644 (file)
@@ -198,6 +198,12 @@ diagonal."
   (interactive)
   (notmuch-hello no-display))
 
   (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)
 
 (defun notmuch-hello (&optional no-display)
   (interactive)
 
@@ -386,6 +392,7 @@ diagonal."
 
       (use-local-map widget-keymap)
       (local-set-key "=" 'notmuch-hello-update)
 
       (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)
       (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)
index b64aeab94a4997053d09e5dc41969344af123d24..3b26aca83f771a9b94add3ff601e50f6dbba7123 100644 (file)
@@ -40,6 +40,8 @@
 
 ;;
 
 
 ;;
 
+(declare-function notmuch-poll ())
+
 (defun notmuch-version ()
   "Return a string with the notmuch version number."
   (let ((long-string
 (defun notmuch-version ()
   "Return a string with the notmuch version number."
   (let ((long-string