* mu4e: automatically update headers when there are updates during indexing,

while there is no current user-interaction. Document this, add to NEWS

  (set `mu4e-headers-auto-update' to nil) to disable
This commit is contained in:
djcb 2012-10-24 18:36:50 +03:00
parent b2b18aee75
commit 7f20ab33b9
3 changed files with 25 additions and 0 deletions

2
NEWS
View File

@ -21,6 +21,8 @@
`mu4e-user-mail-address-list'
- support tags (i.e.., X-Keywords and friends) in the headers-view, and the
message view. Thanks to Abdó Roig-Maranges. New field ":tags".
- automatically update the headers buffer when new messages are found during
indexing; set `mu4e-headers-auto-update' to nil to disable this.
* Old news
:PROPERTIES:

View File

@ -84,6 +84,12 @@ vertical split-view."
:type 'integer
:group 'mu4e-headers)
(defcustom mu4e-headers-auto-update t
"Whether to automatically update the current headers buffer if an
indexing operation showed changes."
:type 'boolean
:group 'mu4e-headers)
;; marks for headers of the form; each is a cons-cell (basic . fancy)
;; each of which is basic ascii char and something fancy, respectively
@ -643,6 +649,16 @@ after the end of the search results."
(make-local-variable 'global-mode-string)
(set (make-local-variable 'hl-line-face) 'mu4e-header-highlight-face)
;; maybe update the current headers upon indexing changes
(add-hook 'mu4e-index-updated-hook
(defun mu4e~headers-auto-update ()
"Update the current headers buffer after indexing has brought
some changes, `mu4e-headers-auto-update' is non-nil and there is no
user-interaction ongoing."
(when (and mu4e-headers-auto-update (not (active-minibuffer-window)))
(with-current-buffer mu4e~headers-buffer
(mu4e-headers-rerun-search)))) nil t)
(setq
truncate-lines t
buffer-undo-list t ;; don't record undo information

View File

@ -733,6 +733,10 @@ u=@emph{unread}. The tooltip for this field also contains this information.
@item The subject field also indicates the discussion threads @footnote{using
Jamie Zawinski's mail threading algorithm,
@url{http://www.jwz.org/doc/threading.html}}.
@item The headers view is @emph{automatically updated} if any changes are
found during the indexing process, and if there is not current
user-interaction. If you do not want such automatic updates, set
@code{mu4e-headers-auto-update} to @code{nil}.
@end itemize
@node Keybindings
@ -2791,6 +2795,9 @@ some soundfile, change as needed):
(defun new-mail-sound ()
(shell-command "aplay ~/Sounds/boing.wav&")))
@end lisp
@item @emph{It seems my headers-buffer is automatically updated when new
messages are found during the indexing process -- can I disable this
somehow?} Yes - set @code{mu4e-headers-auto-update} to @code{nil}.
@item @emph{I don't use @t{offlineimap}, @t{fetchmail} etc., I get my mail
through my own mailserver. What should I use for
@code{mu4e-get-mail-command}}? Use @t{"true"} (or don't do anything, it's the