mu4e-compose: jit-start mu4e in mu4e-compose

Just in case it wasn't running yet.

Fixes #2526
This commit is contained in:
Dirk-Jan C. Binnema 2023-07-28 19:35:39 +03:00
parent dc29dc8395
commit c9b64a0114
1 changed files with 3 additions and 3 deletions

View File

@ -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)