summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2010-04-26 22:05:47 -0700
committerCarl Worth <cworth@cworth.org>2010-04-26 22:05:47 -0700
commitf8e372ebeccff4e2cba323d75ac1278cb22828b9 (patch)
treef64186feba69e500ffddc25d9ca5b9797853d188
parent2a6a0e248174d93f431018ce8b809fc0fdebd847 (diff)
notmuch-hello: Add a 'G' keybinding.
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).
-rw-r--r--emacs/notmuch-hello.el7
-rw-r--r--emacs/notmuch-lib.el2
2 files changed, 9 insertions, 0 deletions
diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index 82a3a4b..97db90e 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -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)
diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
index b64aeab..3b26aca 100644
--- a/emacs/notmuch-lib.el
+++ b/emacs/notmuch-lib.el
@@ -40,6 +40,8 @@
;;
+(declare-function notmuch-poll ())
+
(defun notmuch-version ()
"Return a string with the notmuch version number."
(let ((long-string