* add `mu4e-headers-search-refine' (bound to "/"), which lets you filter the
current search results by appending to the current search expression.
This commit is contained in:
@ -303,6 +303,8 @@ after the end of the search results."
|
|||||||
(define-key map "r" 'mu4e-headers-rerun-search)
|
(define-key map "r" 'mu4e-headers-rerun-search)
|
||||||
(define-key map "g" 'mu4e-headers-rerun-search) ;; for compatibility
|
(define-key map "g" 'mu4e-headers-rerun-search) ;; for compatibility
|
||||||
|
|
||||||
|
(define-key map "/" 'mu4e-headers-search-refine)
|
||||||
|
|
||||||
(define-key map "%" 'mu4e-headers-mark-matches)
|
(define-key map "%" 'mu4e-headers-mark-matches)
|
||||||
(define-key map "t" 'mu4e-headers-mark-subthread)
|
(define-key map "t" 'mu4e-headers-mark-subthread)
|
||||||
(define-key map "T" 'mu4e-headers-mark-thread)
|
(define-key map "T" 'mu4e-headers-mark-thread)
|
||||||
@ -752,6 +754,24 @@ the bookmark before starting the search."
|
|||||||
(mu4e-headers-search-bookmark nil current-prefix-arg t))
|
(mu4e-headers-search-bookmark nil current-prefix-arg t))
|
||||||
|
|
||||||
|
|
||||||
|
(defun mu4e-headers-search-refine (extra search-all)
|
||||||
|
"Do a search based on the last search with clause EXTRA
|
||||||
|
appended. SEARCH-ALL (prefix-argument) determines whether to run
|
||||||
|
*all* results or only up to `mu4e-search-results-limit'. You can
|
||||||
|
use this function to 'filter', 'zoom in' to your search results."
|
||||||
|
(interactive
|
||||||
|
(let ((extra
|
||||||
|
(read-string (mu4e-format "Filter result: ")
|
||||||
|
nil 'mu4e~headers-search-hist nil t))
|
||||||
|
(search-all current-prefix-arg))
|
||||||
|
(list extra search-all)))
|
||||||
|
(unless mu4e~headers-query
|
||||||
|
(error "There's nothing to filter"))
|
||||||
|
(mu4e-headers-search
|
||||||
|
(format "(%s) AND %s" mu4e~headers-query extra) search-all))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(defun mu4e-headers-view-message ()
|
(defun mu4e-headers-view-message ()
|
||||||
"View message at point. If there's an existing window for the
|
"View message at point. If there's an existing window for the
|
||||||
view, re-use that one. If not, create a new one, depending on the
|
view, re-use that one. If not, create a new one, depending on the
|
||||||
|
|||||||
@ -311,6 +311,7 @@ is nil, and otherwise open it."
|
|||||||
(define-key map "z" 'mu4e-view-kill-buffer-and-window)
|
(define-key map "z" 'mu4e-view-kill-buffer-and-window)
|
||||||
|
|
||||||
(define-key map "s" 'mu4e-headers-search)
|
(define-key map "s" 'mu4e-headers-search)
|
||||||
|
(define-key map "/" 'mu4e-headers-search-refine)
|
||||||
|
|
||||||
(define-key map "b" 'mu4e-headers-search-bookmark)
|
(define-key map "b" 'mu4e-headers-search-bookmark)
|
||||||
(define-key map "B" 'mu4e-headers-search-bookmark-edit)
|
(define-key map "B" 'mu4e-headers-search-bookmark-edit)
|
||||||
|
|||||||
Reference in New Issue
Block a user