aboutsummaryrefslogtreecommitdiffhomepage
path: root/emacs/notmuch-hello.el
diff options
context:
space:
mode:
authorGravatar Austin Clements <amdragon@MIT.EDU>2013-09-03 17:45:22 -0400
committerGravatar David Bremner <bremner@debian.org>2013-09-10 08:07:06 -0300
commit21474f0e09defa26421b356100c55299afeb19ef (patch)
tree6822df0c3958b9147c860babfbd51f2d278bec7a /emacs/notmuch-hello.el
parentebd8a2e344bcbf2a4385e56d9328fae5b617e566 (diff)
emacs: Add unified refresh-this-buffer function
This unifies the various refresh and poll-and-refresh functions we have for different modes. Now all modes bind "=" and "G" (except show, which doesn't bind "G" for some reason) to `notmuch-refresh-this-buffer' and `notmuch-poll-and-refresh-this-buffer', respectively.
Diffstat (limited to 'emacs/notmuch-hello.el')
-rw-r--r--emacs/notmuch-hello.el12
1 files changed, 3 insertions, 9 deletions
diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index 94cc4b53..6a7b884c 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -481,15 +481,8 @@ Such a list can be computed with `notmuch-hello-query-counts'."
(defun notmuch-hello-update (&optional no-display)
"Update the current notmuch view."
;; Lazy - rebuild everything.
- (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-window-configuration-change ()
"Hook function to update the hello buffer when it is switched to."
(let ((hello-buf (get-buffer "*notmuch-hello*"))
@@ -528,8 +521,8 @@ Such a list can be computed with `notmuch-hello-query-counts'."
(message "notmuch version %s" (notmuch-version))))
(define-key map "?" 'notmuch-help)
(define-key map "q" 'notmuch-kill-this-buffer)
- (define-key map "=" 'notmuch-hello-update)
- (define-key map "G" 'notmuch-hello-poll-and-update)
+ (define-key map "=" 'notmuch-refresh-this-buffer)
+ (define-key map "G" 'notmuch-poll-and-refresh-this-buffer)
(define-key map (kbd "<C-tab>") 'widget-backward)
(define-key map "m" 'notmuch-mua-new-mail)
(define-key map "s" 'notmuch-search)
@@ -545,6 +538,7 @@ Complete list of currently available key bindings:
\\{notmuch-hello-mode-map}"
(interactive)
(kill-all-local-variables)
+ (setq notmuch-buffer-refresh-function #'notmuch-hello-update)
(use-local-map notmuch-hello-mode-map)
(setq major-mode 'notmuch-hello-mode
mode-name "notmuch-hello")