From c9b64a0114b2be4c49dca927a1d6ec4adec756a0 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Fri, 28 Jul 2023 19:35:39 +0300 Subject: [PATCH] mu4e-compose: jit-start mu4e in mu4e-compose Just in case it wasn't running yet. Fixes #2526 --- mu4e/mu4e-compose.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mu4e/mu4e-compose.el b/mu4e/mu4e-compose.el index 9a7ef961..dbad0557 100644 --- a/mu4e/mu4e-compose.el +++ b/mu4e/mu4e-compose.el @@ -739,6 +739,9 @@ Symbol `edit' is only allowed for draft messages." (not (member 'draft (mu4e-message-field msg :flags)))) (mu4e-warn "Editing is only allowed for draft messages")) + (unless (mu4e-running-p) ;; start mu4e if it's not yet running. + (mu4e 'background)) + ;; 'new is special, since it takes no existing message as arg; therefore, we ;; don't need to involve the backend, and call the handler *directly* (if (eq compose-type 'new) @@ -826,9 +829,6 @@ caller. It has the form (FUNCTION . ARGS). The function is called after the mail has been sent or put aside, and the mail buffer buried." - (unless (mu4e-running-p) - (mu4e)) - ;; create a new draft message 'resetting' (as below) is not actually needed in ;; this case, but let's prepare for the re-edit case as well (mu4e~compose-handler 'new nil nil)