mu4e-drafts: improve mu4e--fcc-path

Reworked from the pull #2698 for the new branch.
This commit is contained in:
Dirk-Jan C. Binnema
2024-04-25 22:31:43 +03:00
parent a9b78718b2
commit a49cd03f6b

View File

@ -249,17 +249,19 @@ base filename without any Maildir decoration.
Returns the path for the sent message, either in the sent or
trash folder, or nil if the message should be removed after
sending."
(when-let ((sent-dir
(pcase mu4e-sent-messages-behavior
(let* ((behavior
(if (functionp mu4e-sent-messages-behavior)
(funcall mu4e-sent-messages-behavior) mu4e-sent-messages-behavior))
(sent-dir
(pcase behavior
('delete nil)
('trash (mu4e-get-trash-folder parent))
('sent (mu4e-get-sent-folder parent))
((pred functionp) (funcall mu4e-sent-messages-behavior))
(_ (mu4e-error "Error in `mu4e-sent-messages-behavior'")))))
(mu4e-join-paths
(mu4e-root-maildir) sent-dir "cur"
(format "%s%s2,S" base-name mu4e-maildir-info-delimiter))))
(when sent-dir
(mu4e-join-paths
(mu4e-root-maildir) sent-dir "cur"
(format "%s%s2,S" base-name mu4e-maildir-info-delimiter)))))
(defconst mu4e--header-separator