mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Mu4e: Make the delete action trash for gmail
This commit is contained in:
@ -368,7 +368,8 @@ Must be set before org-msg is loaded to take effect.")
|
||||
:show-target (lambda (target) "delete")
|
||||
:action (lambda (docid msg target)
|
||||
(if (+mu4e-msg-gmail-p msg)
|
||||
(progn (message "The delete operation is invalid for Gmail accounts.")
|
||||
(progn (message "The delete operation is invalid for Gmail accounts. Trashing instead.")
|
||||
(+mu4e--mark-seen docid msg target)
|
||||
(when (< 2 (- (float-time) +mu4e--last-invalid-gmail-action))
|
||||
(sit-for 1))
|
||||
(setq +mu4e--last-invalid-gmail-action (float-time)))
|
||||
@ -401,6 +402,7 @@ Must be set before org-msg is loaded to take effect.")
|
||||
(when (+mu4e-msg-gmail-p msg)
|
||||
(pcase mark
|
||||
(`trash (mu4e-action-retag-message msg "-\\Inbox,+\\Trash,-\\Draft"))
|
||||
(`delete (mu4e-action-retag-message msg "-\\Inbox,+\\Trash,-\\Draft"))
|
||||
(`refile (mu4e-action-retag-message msg "-\\Inbox"))
|
||||
(`flag (mu4e-action-retag-message msg "+\\Starred"))
|
||||
(`unflag (mu4e-action-retag-message msg "-\\Starred"))))))))
|
||||
|
Reference in New Issue
Block a user