mu4e-compose: split off parts in mu4e-draft; rework

Move draft-creation part of message-composition to a new file
mu4e-drafts

However, this is more than just some refactoring: rework the
message (draft) setup as such to ensure we always get a (non-active,
live) buffer back from the composition process.

This also fixes

(progn
  (compose-mail "test@example.org" "Test")
  (insert "TEST"))

as mentioned on the mailing list.

Fixes #2699
This commit is contained in:
Dirk-Jan C. Binnema
2024-04-23 19:19:26 +03:00
parent 178402fabb
commit 6a4d6a49c4
5 changed files with 771 additions and 670 deletions

View File

@ -1,6 +1,6 @@
;;; mu4e-obsolete.el --- Obsolete things -*- lexical-binding: t -*-
;; Copyright (C) 2022-2023 Dirk-Jan C. Binnema
;; Copyright (C) 2022-2024 Dirk-Jan C. Binnema
;; Author: Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
;; Maintainer: Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
@ -65,6 +65,10 @@
'mu4e-compose-cite-function 'message-cite-function "1.11.22")
(define-obsolete-variable-alias
'mu4e-compose-in-new-frame 'mu4e-compose-switch "1.11.22")
(define-obsolete-variable-alias 'mu4e-compose-hidden-headers
'mu4e-draft-hidden-headers "1.12.5")
;; mu4e-message