]> git.notmuchmail.org Git - notmuch/commitdiff
notmuch.el: Add an '=' key to refresh the current view.
authorCarl Worth <cworth@cworth.org>
Tue, 3 Nov 2009 19:47:48 +0000 (11:47 -0800)
committerCarl Worth <cworth@cworth.org>
Tue, 3 Nov 2009 19:47:48 +0000 (11:47 -0800)
This will allow for updates when a separate process (say, a notmuch-
show buffer), has archived messages.

notmuch.el

index 545b09c68b8c9cf1938ff025ffa0282f90adc699..c00d359598a85b05d4b699c8e7079c0284d810a9 100644 (file)
@@ -286,6 +286,7 @@ Before moving, also remove the \"unread\" tag from the current message."
     (define-key map "-" 'notmuch-search-remove-tag)
     (define-key map "<" 'beginning-of-buffer)
     (define-key map ">" 'notmuch-search-goto-last-thread)
     (define-key map "-" 'notmuch-search-remove-tag)
     (define-key map "<" 'beginning-of-buffer)
     (define-key map ">" 'notmuch-search-goto-last-thread)
+    (define-key map "=" 'notmuch-search-refresh-view)
     (define-key map "\M->" 'notmuch-search-goto-last-thread)
     map)
   "Keymap for \"notmuch search\" buffers.")
     (define-key map "\M->" 'notmuch-search-goto-last-thread)
     map)
   "Keymap for \"notmuch search\" buffers.")
@@ -415,6 +416,16 @@ Before moving, also remove the \"unread\" tag from the current message."
          )
        ))))
 
          )
        ))))
 
+(defun notmuch-search-refresh-view ()
+  "Refresh the current view.
+
+Kills the current buffer and runs a new search with the same
+query string as the current search."
+  (interactive)
+  (let ((query notmuch-search-query-string))
+    (kill-this-buffer)
+    (notmuch-search query)))
+
 (defun notmuch-search-filter (query)
   "Run \"notmuch search\" to refine the current search results.
 
 (defun notmuch-search-filter (query)
   "Run \"notmuch search\" to refine the current search results.