* mu4e: don't try to kill the visible window when there is none (thanks to thierryvolpiatto)
This commit is contained in:
@ -824,17 +824,14 @@ in the background; otherwise, pop up a window."
|
|||||||
;; not really an error of course, but it's hard to distinguish
|
;; not really an error of course, but it's hard to distinguish
|
||||||
;; from a genuine error
|
;; from a genuine error
|
||||||
(maybe-error (or (not (eq status 'exit)) (/= code 0)))
|
(maybe-error (or (not (eq status 'exit)) (/= code 0)))
|
||||||
(buf (process-buffer proc)))
|
(buf (process-buffer proc))
|
||||||
|
(visible-window (get-buffer-window buf 'visible)))
|
||||||
(message nil)
|
(message nil)
|
||||||
;; there may be an error, give the user up to 5 seconds to check
|
;; there may be an error, give the user up to 5 seconds to check
|
||||||
(when maybe-error (sit-for 5))
|
(when maybe-error (sit-for 5))
|
||||||
(mu4e-update-index)
|
(mu4e-update-index)
|
||||||
(ignore-errors
|
(when (and (buffer-live-p buf) visible-window)
|
||||||
;; XXXX something goes wrong here, perhaps we're trying to quit
|
(with-selected-window (get-buffer-window buf) (quit-window t))))))
|
||||||
;; while we're in the echo area? the ignore-errors silences the
|
|
||||||
;; problem for now...
|
|
||||||
(when (buffer-live-p buf)
|
|
||||||
(with-selected-window (get-buffer-window buf) (quit-window t)))))))
|
|
||||||
;; if we're running in the foreground, handle password requests
|
;; if we're running in the foreground, handle password requests
|
||||||
(unless run-in-background
|
(unless run-in-background
|
||||||
(process-put proc 'x-interactive (not run-in-background))
|
(process-put proc 'x-interactive (not run-in-background))
|
||||||
|
|||||||
Reference in New Issue
Block a user