diff --git a/mu4e/mu4e-compose.el b/mu4e/mu4e-compose.el index 2656d25a..1106d65f 100644 --- a/mu4e/mu4e-compose.el +++ b/mu4e/mu4e-compose.el @@ -377,7 +377,7 @@ tempfile)." ;; hide some headers (mu4e~compose-hide-headers) ;; switch on the mode - (mu4e-compose-mode)) + (run-with-timer 0.01 nil #'(lambda () (mu4e-compose-mode)))) (defun mu4e-sent-handler (docid path) diff --git a/mu4e/mu4e-utils.el b/mu4e/mu4e-utils.el index d8dc162a..9b039942 100644 --- a/mu4e/mu4e-utils.el +++ b/mu4e/mu4e-utils.el @@ -805,6 +805,10 @@ The messages are inserted into the process buffer." run-in-background is non-nil (or called with prefix-argument), run in the background; otherwise, pop up a window." (interactive "P") + (when (and mu4e~update-buffer-name + (get-buffer-process + (get-buffer mu4e~update-buffer-name))) + (mu4e-error "Update process is already running")) (run-hooks 'mu4e-update-pre-hook) (unless mu4e-get-mail-command (mu4e-error "`mu4e-get-mail-command' is not defined"))