Skip to content

Instantly share code, notes, and snippets.

@areina
Created October 30, 2013 10:54
Show Gist options
  • Save areina/7230684 to your computer and use it in GitHub Desktop.
Save areina/7230684 to your computer and use it in GitHub Desktop.
mu4e - Dynamic trash folder for multiple accounts
(defun custom-mu4e-trash-folder (msg)
(if msg
(cond
((string-match "[email protected]" (mu4e-message-field msg :maildir))
"/[email protected]/[Gmail].Trash")
((string-match "[email protected]" (mu4e-message-field msg :maildir))
"/[email protected]/[Gmail].Trash"))
(mu4e-ask-maildir-check-exists "Save message to maildir: ")))
(setq mu4e-trash-folder 'custom-mu4e-trash-folder)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment