mu4e-drafts: improve mu4e--fcc-path
Reworked from the pull #2698 for the new branch.
This commit is contained in:
@ -249,17 +249,19 @@ base filename without any Maildir decoration.
|
|||||||
Returns the path for the sent message, either in the sent or
|
Returns the path for the sent message, either in the sent or
|
||||||
trash folder, or nil if the message should be removed after
|
trash folder, or nil if the message should be removed after
|
||||||
sending."
|
sending."
|
||||||
(when-let ((sent-dir
|
(let* ((behavior
|
||||||
(pcase mu4e-sent-messages-behavior
|
(if (functionp mu4e-sent-messages-behavior)
|
||||||
|
(funcall mu4e-sent-messages-behavior) mu4e-sent-messages-behavior))
|
||||||
|
(sent-dir
|
||||||
|
(pcase behavior
|
||||||
('delete nil)
|
('delete nil)
|
||||||
('trash (mu4e-get-trash-folder parent))
|
('trash (mu4e-get-trash-folder parent))
|
||||||
('sent (mu4e-get-sent-folder parent))
|
('sent (mu4e-get-sent-folder parent))
|
||||||
((pred functionp) (funcall mu4e-sent-messages-behavior))
|
|
||||||
(_ (mu4e-error "Error in `mu4e-sent-messages-behavior'")))))
|
(_ (mu4e-error "Error in `mu4e-sent-messages-behavior'")))))
|
||||||
(mu4e-join-paths
|
(when sent-dir
|
||||||
(mu4e-root-maildir) sent-dir "cur"
|
(mu4e-join-paths
|
||||||
(format "%s%s2,S" base-name mu4e-maildir-info-delimiter))))
|
(mu4e-root-maildir) sent-dir "cur"
|
||||||
|
(format "%s%s2,S" base-name mu4e-maildir-info-delimiter)))))
|
||||||
|
|
||||||
|
|
||||||
(defconst mu4e--header-separator
|
(defconst mu4e--header-separator
|
||||||
|
|||||||
Reference in New Issue
Block a user