* mu4e-utils.el: don't close mail retrieval window when there's an error
This commit is contained in:
@ -319,13 +319,16 @@ processing takes part in the background, unless buf is non-nil."
|
|||||||
mu4e-update-mail-name buf mu4e-get-mail-command)))
|
mu4e-update-mail-name buf mu4e-get-mail-command)))
|
||||||
(message "Retrieving mail...")
|
(message "Retrieving mail...")
|
||||||
(set-process-sentinel proc
|
(set-process-sentinel proc
|
||||||
(lambda (proc msg)
|
(lambda (proc msg)
|
||||||
(message nil)
|
(let ((status (process-status proc)) (code (process-exit-status proc)))
|
||||||
(mu4e-proc-index mu4e-maildir)
|
(message nil)
|
||||||
(let ((buf (process-buffer proc)))
|
(if (or (not (eq status 'exit)) (/= code 0))
|
||||||
(when (buffer-live-p buf)
|
(message "Some error occured while retrieving mail")
|
||||||
(kill-buffer buf)))))
|
(progn ;; update went well, now rerun the index
|
||||||
(set-process-query-on-exit-flag proc t)))
|
(mu4e-proc-index mu4e-maildir)
|
||||||
|
(let ((buf (process-buffer proc)))
|
||||||
|
(when (buffer-live-p buf)
|
||||||
|
(kill-buffer buf))))))))))
|
||||||
|
|
||||||
|
|
||||||
(defun mu4e-display-manual ()
|
(defun mu4e-display-manual ()
|
||||||
|
|||||||
Reference in New Issue
Block a user