From aa9781e3fe276b1acbefd7d91d5478261ef0542c Mon Sep 17 00:00:00 2001 From: Flinner Date: Fri, 18 Mar 2022 23:02:01 +0300 Subject: [PATCH] feat: correct mu4e trashing behavior --- emacs.mine/.config/emacs.mine/emacs.org | 36 +++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/emacs.mine/.config/emacs.mine/emacs.org b/emacs.mine/.config/emacs.mine/emacs.org index 9f0070d..9206628 100644 --- a/emacs.mine/.config/emacs.mine/emacs.org +++ b/emacs.mine/.config/emacs.mine/emacs.org @@ -2165,7 +2165,7 @@ I wrote that, neat isn't it? :P #+end_src -* Email +* Email (mu4e) ** Contexts #+begin_src emacs-lisp ;; assumed Maildir layout @@ -2233,7 +2233,7 @@ I wrote that, neat isn't it? :P #+end_src -** Send email +** Send email (msmtp) #+begin_src emacs-lisp (setq sendmail-program "/usr/bin/msmtp" message-sendmail-f-is-evil t @@ -2244,6 +2244,9 @@ I wrote that, neat isn't it? :P ** Email List here! #+begin_src emacs-lisp :tangle no + ;; This is a sample, it doesn't get included in init.el + ;; I put mine at location specified in the next code block + ;; any number of email can be used ofc (setq mu4e-contexts `( ,(my-make-mu4e-context "maildir-context" "Full Name" @@ -2260,6 +2263,35 @@ or don't include in git source :) (load "~/Documents/passwords/mu4e-context.el")) #+end_src +** Other fixes + +see: [[https://github.com/djcb/mu/issues/1136][djcb/mu#1136 Shouldn't set flag T after moving to trash]]. Deleting +should only move to trash, not delete entirely from the server + +#+begin_src emacs-lisp +(setf (alist-get 'trash mu4e-marks) + (list :char '("d" . "▼") + :prompt "dtrash" + :dyn-target (lambda (target msg) + (mu4e-get-trash-folder msg)) + :action (lambda (docid msg target) + ;; Here's the main difference to the regular trash mark, + ;; no +T before -N so the message is not marked as + ;; IMAP-deleted: + (mu4e--server-move docid (mu4e--mark-check-target target) "-N")))) + +#+end_src + +#+begin_src emacs-lisp + (setq mu4e-completing-read-function 'completing-read);; Use Helm + (setq message-kill-buffer-on-exit t) ;; Why would I want to leave my message open after I've sent it? +#+end_src + +Breaking change betweeen =mu4e-alert= and =mu= :( +#+begin_src emacs-lisp + (defvaralias 'mu4e~context-current 'mu4e--context-current) +#+end_src + * Telega #+begin_src emacs-lisp (use-package telega