diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/email.el | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lisp/email.el b/lisp/email.el index bb5dde7..7bbcac0 100644 --- a/lisp/email.el +++ b/lisp/email.el @@ -22,6 +22,29 @@ (setq mu4e-hide-index-messages t) (setq mu4e-html2text-command 'mu4e-shr2text) (setq mu4e-view-show-images t) + +(defun my/mu4e-trash-folder (msg) + "Do not copy mails across maildirs to trash them." + (let ((dir (and msg + (mu4e-message-field-raw msg :maildir)))) + (cond + ((not dir) "/private/Trash") + ((string-prefix-p "/mdc-personal" dir) + "/mdc-personal/Deleted Items") + (t (let ((prefix (cadr (split-string dir "/")))) + (concat "/" prefix "/Trash")))))) + +(defun my/mu4e-refile-folder (msg) + "Do not copy mails across maildirs to archive them." + (let ((dir (and msg + (mu4e-message-field-raw msg :maildir)))) + (cond + ((not dir) "/private/Archives") + ((string-prefix-p "/mdc-personal" dir) + "/mdc-personal/Archive") + (t (let ((prefix (cadr (split-string dir "/")))) + (concat "/" prefix "/Archives")))))) + ;; use imagemagick, if available (when (fboundp 'imagemagick-register-types) (imagemagick-register-types)) |