mirror of https://github.com/djcb/mu.git
* mu4e-headers: make refreshing default when changing sort etc.; also turn off
threading when sorting for anything but date
This commit is contained in:
parent
6c854e4a25
commit
79f17ab4ad
|
@ -962,9 +962,9 @@ the last search expression."
|
|||
(format "(%s) AND %s" mu4e~headers-last-query filter)))
|
||||
|
||||
|
||||
(defun mu4e-headers-change-sorting (&optional rerun)
|
||||
(defun mu4e-headers-change-sorting (&optional dont-refresh)
|
||||
"Interactively change the sorting/threading parameters. With prefix-argument,
|
||||
rerun the last search with the new parameters."
|
||||
do _not_ refresh the last search with the new parameters."
|
||||
(interactive "P")
|
||||
(let* ((sortfield
|
||||
(mu4e-read-option "Sortfield: " mu4e~headers-sortfield-choices))
|
||||
|
@ -974,34 +974,41 @@ rerun the last search with the new parameters."
|
|||
(setq
|
||||
mu4e-headers-sortfield sortfield
|
||||
mu4e-headers-sort-revert revert) ;; "descending" means "revert"
|
||||
;; turn off threading if we don't sort by date (FIXME)
|
||||
(unless (eq sortfield 'date)
|
||||
(setq mu4e-headers-show-threads nil))
|
||||
(mu4e-message "Sorting by %s (%s)%s"
|
||||
(symbol-name sortfield)
|
||||
(if revert "descending" "ascending")
|
||||
(if rerun
|
||||
"" " (press 'g' to refresh)"))
|
||||
(when rerun
|
||||
(if dont-refresh
|
||||
" (press 'g' to refresh)" ""))
|
||||
(unless dont-refresh
|
||||
(mu4e-headers-rerun-search))))
|
||||
|
||||
(defun mu4e-headers-toggle-threading (&optional rerun)
|
||||
(defun mu4e-headers-toggle-threading (&optional dont-refresh)
|
||||
"Toggle threading on/off for the search results. With prefix-argument,
|
||||
rerun the last search with the new setting for threading."
|
||||
do _not_ refresh the last search with the new setting for
|
||||
threading."
|
||||
(interactive "P")
|
||||
(setq mu4e-headers-show-threads (not mu4e-headers-show-threads))
|
||||
(mu4e-message "Threading turned %s%s"
|
||||
(if mu4e-headers-show-threads "on" "off")
|
||||
(if rerun "" " (press 'g' to refresh)"))
|
||||
(when rerun
|
||||
(if dont-refresh
|
||||
" (press 'g' to refresh)" ""))
|
||||
(unless dont-refresh
|
||||
(mu4e-headers-rerun-search)))
|
||||
|
||||
(defun mu4e-headers-toggle-full-search (&optional rerun)
|
||||
(defun mu4e-headers-toggle-full-search (&optional dont-refresh)
|
||||
"Toggle full-search on/off for the search results. With prefix-argument,
|
||||
rerun the last search with the new setting for threading."
|
||||
do _not_ refresh the last search with the new setting for
|
||||
threading."
|
||||
(interactive "P")
|
||||
(setq mu4e-headers-full-search (not mu4e-headers-full-search))
|
||||
(mu4e-message "Full search turned %s%s"
|
||||
(if mu4e-headers-full-search "on" "off")
|
||||
(if rerun "" " (press 'g' to refresh)"))
|
||||
(when rerun
|
||||
(if dont-refresh
|
||||
" (press 'g' to refresh)" ""))
|
||||
(unless dont-refresh
|
||||
(mu4e-headers-rerun-search)))
|
||||
|
||||
|
||||
|
|
|
@ -617,8 +617,8 @@ affects the sort order.
|
|||
|
||||
You can change the sort order with @t{M-x mu4e-headers-change-sorting} or
|
||||
@key{O}, and you can toggle threading on/off using @t{M-x
|
||||
mu4e-headers-toggle-threading} or @key{P}. For both of these functions, if you
|
||||
provide a prefix argument (@key{C-u}), the current search is updated
|
||||
mu4e-headers-toggle-threading} or @key{P}. For both of these functions, unless
|
||||
you provide a prefix argument (@key{C-u}), the current search is updated
|
||||
immediately using the new parameters. You can toggle full-search
|
||||
(@ref{Searching}) using @t{M-x mu4e-headers-toggle-full-search} or @key{Q}.
|
||||
|
||||
|
|
Loading…
Reference in New Issue