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)
|
"Indexing... processed %d, updated %d" processed updated)
|
||||||
(progn
|
(progn
|
||||||
(mu4e-index-message
|
(mu4e-index-message
|
||||||
"Indexing completed; processed %d, updated %d, cleaned-up %d"
|
"%s completed; processed %d, updated %d, cleaned-up %d%s"
|
||||||
processed updated cleaned-up)
|
(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.
|
;; call the updated hook if anything changed.
|
||||||
(unless (zerop (+ updated cleaned-up))
|
(unless (zerop (+ updated cleaned-up))
|
||||||
(run-hooks 'mu4e-index-updated-hook))
|
(run-hooks 'mu4e-index-updated-hook))
|
||||||
|
@ -945,7 +950,17 @@ Also scrolls to the final line, and update the progress throbber."
|
||||||
(defun mu4e-update-index ()
|
(defun mu4e-update-index ()
|
||||||
"Update the mu4e index."
|
"Update the mu4e index."
|
||||||
(interactive)
|
(interactive)
|
||||||
(mu4e~proc-index mu4e-index-cleanup mu4e-index-lazy-check))
|
(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
|
(defvar mu4e~update-buffer nil
|
||||||
"Internal, store the buffer of the update process when
|
"Internal, store the buffer of the update process when
|
||||||
|
|
|
@ -138,7 +138,12 @@ limitations: since directory timestamp changes do not traverse
|
||||||
upwards and therefore this does not see changes in
|
upwards and therefore this does not see changes in
|
||||||
sub-directories: a change in 'bar' in 'Maildir/foo/bar/...' is
|
sub-directories: a change in 'bar' in 'Maildir/foo/bar/...' is
|
||||||
not detected, only a change in 'foo'. In that case, this option
|
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
|
:type 'boolean
|
||||||
:group 'mu4e
|
:group 'mu4e
|
||||||
:safe 'booleanp)
|
:safe 'booleanp)
|
||||||
|
|
|
@ -611,8 +611,12 @@ following:
|
||||||
@end lisp
|
@end lisp
|
||||||
|
|
||||||
In many cases, the mentioned thoroughness might not be needed, and
|
In many cases, the mentioned thoroughness might not be needed, and
|
||||||
these settings give a very significant speed-up. Note that you can of
|
these settings give a very significant speed-up. If it does not work
|
||||||
course occasionally run a thorough indexing round.
|
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
|
For further details, please refer to the @t{mu-index} manpage; in
|
||||||
particular, see @t{.noindex} and @t{.noupdate} which can help reducing
|
particular, see @t{.noindex} and @t{.noupdate} which can help reducing
|
||||||
|
|
Loading…
Reference in New Issue