From 10978904f827321328ab9d3221594008ae29c9fa Mon Sep 17 00:00:00 2001 From: Lucien Cartier-Tilet Date: Wed, 27 Jan 2021 16:37:35 +0100 Subject: [PATCH] [Emacs] Update maildirs in mu4e bookmarks, sign emails MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Turns out isync didn’t sync my /Junk directory in which were a lot of emails I would have liked to read. Now bookmarks referring to /Inbox also display content from /Junk Also, emails are automatically signed with PGP/MIME now. --- org/config/emacs.org | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/org/config/emacs.org b/org/config/emacs.org index b428e3a..74b1b3a 100644 --- a/org/config/emacs.org +++ b/org/config/emacs.org @@ -3511,8 +3511,8 @@ This source block is an example of the search queries in mu4e, and part of the r #+BEGIN_SRC emacs-lisp (setq mu4e-bookmarks `((,(s-join " " - '("maildir:/Inbox" - "AND NOT flag:trashed" + '("NOT flag:trashed" + "AND (maildir:/Inbox OR maildir:/Junk)" "AND NOT to:CONLANG@LISTSERV.BROWN.EDU" "AND NOT to:AUXLANG@LISTSERV.BROWN.EDU" "AND NOT to:ateliers-emacs@framalistes.org" @@ -3521,22 +3521,20 @@ This source block is an example of the search queries in mu4e, and part of the r "AND NOT list:ateliers-paris.emacs-doctor.com")) "Inbox" ?i) ;; Inbox without the linguistics mailing lists (,(s-join " " - '("maildir:/Inbox" - "AND NOT flag:trashed" + '("NOT flag:trashed" + "AND (maildir:/Inbox OR maildir:/Junk)" "AND (f:/.*up8\.edu|.*univ-paris8.*/" "OR c:/.*up8\.edu|.*univ-paris8.*/" "OR t:/.*up8\.edu|.*univ-paris8.*/)")) "University" ?u) ;; University-related emails (,(s-join " " - '("maildir:/Inbox" - "AND (to:CONLANG@LISTSERV.BROWN.EDU" - "OR to:AUXLANG@LISTSERV.BROWN.EDU)")) + '("to:CONLANG@LISTSERV.BROWN.EDU" + "OR to:AUXLANG@LISTSERV.BROWN.EDU")) "Linguistics" ?l) ;; linguistics mailing lists (,(s-join " " - '("maildir:/Inbox" - "AND (list:ateliers-emacs.framalistes.org" + '("list:ateliers-emacs.framalistes.org" "OR to:ateliers-paris@emacs-doctor.com" - "OR list:ateliers-paris.emacs-doctor.com)")) + "OR list:ateliers-paris.emacs-doctor.com")) "Emacs" ?e) ;; Emacs mailing list ("maildir:/Sent" "Sent messages" ?s) ("flag:unread AND NOT flag:trashed" "Unread messages" ?U) @@ -3565,6 +3563,11 @@ This is the setup I have for my SMTP mail server: I point Emacs’ SMTP services message-send-mail-function 'smtpmail-send-it) #+END_SRC +I wish my emails to be signed by default using PGP/MIME. ~mu4e~ uses ~message~ for composing new emails, so I simply need to add the function that will add the signature to emails to the hook called when creating a new email. +#+BEGIN_SRC emacs-lisp + (add-hook 'mu4e-compose-mode-hook 'mml-secure-message-sign-pgpmime) +#+END_SRC + *** Visual Configuration :PROPERTIES: :CUSTOM_ID: User-Configuration-Mu4e-Visual-Configuration-34f56f7e