mirror of https://github.com/djcb/mu.git
mu4e: better feedback for lazy indexing
Add `mu4e-update-index-nonlazy`, point users towards it.
This commit is contained in:
parent
ab51f1553b
commit
6537de1116
|
@ -644,8 +644,13 @@ process."
|
|||
"Indexing... processed %d, updated %d" processed updated)
|
||||
(progn
|
||||
(mu4e-index-message
|
||||
"Indexing completed; processed %d, updated %d, cleaned-up %d"
|
||||
processed updated cleaned-up)
|
||||
"%s completed; processed %d, updated %d, cleaned-up %d%s"
|
||||
(if mu4e-index-lazy-check "Lazy indexing" "Indexing")
|
||||
processed updated cleaned-up
|
||||
(if (and mu4e-index-lazy-check
|
||||
(not (eq mu4e-index-lazy-check 'lazy))
|
||||
(= 0 updated))
|
||||
" (consider M-x mu4e-update-nonlazy)" ""))
|
||||
;; call the updated hook if anything changed.
|
||||
(unless (zerop (+ updated cleaned-up))
|
||||
(run-hooks 'mu4e-index-updated-hook))
|
||||
|
@ -947,6 +952,16 @@ Also scrolls to the final line, and update the progress throbber."
|
|||
(interactive)
|
||||
(mu4e~proc-index mu4e-index-cleanup mu4e-index-lazy-check))
|
||||
|
||||
(defun mu4e-update-index-nonlazy ()
|
||||
"Update the mu4e index non-lazily.
|
||||
This is just a convenience wrapper for indexing the non-lazy way
|
||||
if you otherwise want to use `mu4e-index-lazy-check'."
|
||||
(interactive)
|
||||
(let ((mu4e-index-cleanup nil) (mu4e-index-lazy-check nil))
|
||||
(mu4e-update-index)))
|
||||
|
||||
|
||||
|
||||
(defvar mu4e~update-buffer nil
|
||||
"Internal, store the buffer of the update process when
|
||||
updating.")
|
||||
|
|
|
@ -138,7 +138,12 @@ limitations: since directory timestamp changes do not traverse
|
|||
upwards and therefore this does not see changes in
|
||||
sub-directories: a change in 'bar' in 'Maildir/foo/bar/...' is
|
||||
not detected, only a change in 'foo'. In that case, this option
|
||||
should not be set."
|
||||
should not be set.
|
||||
|
||||
Note: if no updated/new message were found during the lazy check,
|
||||
mu4e will suggest using `mu4e-update-index-nonlazy'; if you do
|
||||
not wish to see that suggestion, set `mu4e-index-lazy-check' to the
|
||||
symbol `lazy'."
|
||||
:type 'boolean
|
||||
:group 'mu4e
|
||||
:safe 'booleanp)
|
||||
|
|
|
@ -611,8 +611,12 @@ following:
|
|||
@end lisp
|
||||
|
||||
In many cases, the mentioned thoroughness might not be needed, and
|
||||
these settings give a very significant speed-up. Note that you can of
|
||||
course occasionally run a thorough indexing round.
|
||||
these settings give a very significant speed-up. If it does not work
|
||||
for you (e.g., @t{mu4e} fails to find some new messages), simply leave
|
||||
at the default.
|
||||
|
||||
Note that you can occasionally run a thorough indexing round using
|
||||
@code{mu4e-update-index-nonlazy}.
|
||||
|
||||
For further details, please refer to the @t{mu-index} manpage; in
|
||||
particular, see @t{.noindex} and @t{.noupdate} which can help reducing
|
||||
|
|
Loading…
Reference in New Issue