Make mu4e move messages to trash without marking them as such
This commit is contained in:
parent
20933e207d
commit
f316065c93
25
init.el
25
init.el
@ -924,8 +924,7 @@ COMMAND and COMINT are like `compile'."
|
||||
(defun my/setup-cmake-ts-mode ()
|
||||
"Setup `cmake-ts-mode' buffers."
|
||||
(setq-local indent-line-function #'cmake-indent))
|
||||
(add-hook 'cmake-ts-mode-hook #'my/setup-cmake-ts-mode)
|
||||
(add-hook 'cmake-ts-mode-hook #'eglot-ensure))
|
||||
(add-hook 'cmake-ts-mode-hook #'my/setup-cmake-ts-mode))
|
||||
|
||||
;; kdl
|
||||
(require 'kdl-ts-mode)
|
||||
@ -1294,7 +1293,13 @@ If no name is given, list all bookmarks instead."
|
||||
:bind (("C-x C-m" . mu4e)
|
||||
("C-x m" . mu4e-compose-new)
|
||||
:map message-mode-map
|
||||
("C-c k" . khard-insert-email-contact))
|
||||
("C-c k" . khard-insert-email-contact)
|
||||
:map mu4e-headers-mode-map
|
||||
([remap mu4e-headers-mark-for-trash] .
|
||||
my/mu4e-headers-mark-for-trash)
|
||||
:map mu4e-view-mode-map
|
||||
([remap mu4e-view-mark-for-trash] .
|
||||
my/mu4e-view-mark-for-trash))
|
||||
:init
|
||||
(require 'mu4e)
|
||||
(evil-define-key '(normal motion) mu4e-main-mode-map "q" #'bury-buffer)
|
||||
@ -1309,6 +1314,20 @@ If no name is given, list all bookmarks instead."
|
||||
"Run `mu4e-update-mail-and-index' without any messages in the background."
|
||||
(setq mu4e-hide-index-messages t)
|
||||
(mu4e-update-mail-and-index t))
|
||||
(defun my/mu4e-headers-mark-for-trash ()
|
||||
"Move the message a point to the trash without marking it was deleted
|
||||
(trashed)."
|
||||
(interactive)
|
||||
(when (mu4e-thread-message-folded-p)
|
||||
(mu4e-warn "Cannot mark folded messages"))
|
||||
(mu4e-mark-at-point 'move mu4e-trash-folder)
|
||||
(when mu4e-headers-advance-after-mark
|
||||
(mu4e-headers-next)))
|
||||
(defun my/mu4e-view-mark-for-trash ()
|
||||
"Like `my/mu4e-headers-mark-for-trash', but for `mu4e-view-mode'."
|
||||
(interactive)
|
||||
(mu4e--view-in-headers-context
|
||||
(my/mu4e-headers-mark-for-trash)))
|
||||
(setq message-kill-buffer-on-exit t
|
||||
message-send-mail-function 'sendmail-send-it
|
||||
mu4e-change-filenames-when-moving t
|
||||
|
Loading…
Reference in New Issue
Block a user