[Emacs] Update maildirs in mu4e bookmarks, sign emails

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.
This commit is contained in:
Lucien Cartier-Tilet 2021-01-27 16:37:35 +01:00
parent 026b005cd0
commit 10978904f8
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA

View File

@ -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 #+BEGIN_SRC emacs-lisp
(setq mu4e-bookmarks (setq mu4e-bookmarks
`((,(s-join " " `((,(s-join " "
'("maildir:/Inbox" '("NOT flag:trashed"
"AND NOT flag:trashed" "AND (maildir:/Inbox OR maildir:/Junk)"
"AND NOT to:CONLANG@LISTSERV.BROWN.EDU" "AND NOT to:CONLANG@LISTSERV.BROWN.EDU"
"AND NOT to:AUXLANG@LISTSERV.BROWN.EDU" "AND NOT to:AUXLANG@LISTSERV.BROWN.EDU"
"AND NOT to:ateliers-emacs@framalistes.org" "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")) "AND NOT list:ateliers-paris.emacs-doctor.com"))
"Inbox" ?i) ;; Inbox without the linguistics mailing lists "Inbox" ?i) ;; Inbox without the linguistics mailing lists
(,(s-join " " (,(s-join " "
'("maildir:/Inbox" '("NOT flag:trashed"
"AND NOT flag:trashed" "AND (maildir:/Inbox OR maildir:/Junk)"
"AND (f:/.*up8\.edu|.*univ-paris8.*/" "AND (f:/.*up8\.edu|.*univ-paris8.*/"
"OR c:/.*up8\.edu|.*univ-paris8.*/" "OR c:/.*up8\.edu|.*univ-paris8.*/"
"OR t:/.*up8\.edu|.*univ-paris8.*/)")) "OR t:/.*up8\.edu|.*univ-paris8.*/)"))
"University" ?u) ;; University-related emails "University" ?u) ;; University-related emails
(,(s-join " " (,(s-join " "
'("maildir:/Inbox" '("to:CONLANG@LISTSERV.BROWN.EDU"
"AND (to:CONLANG@LISTSERV.BROWN.EDU" "OR to:AUXLANG@LISTSERV.BROWN.EDU"))
"OR to:AUXLANG@LISTSERV.BROWN.EDU)"))
"Linguistics" ?l) ;; linguistics mailing lists "Linguistics" ?l) ;; linguistics mailing lists
(,(s-join " " (,(s-join " "
'("maildir:/Inbox" '("list:ateliers-emacs.framalistes.org"
"AND (list:ateliers-emacs.framalistes.org"
"OR to:ateliers-paris@emacs-doctor.com" "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 "Emacs" ?e) ;; Emacs mailing list
("maildir:/Sent" "Sent messages" ?s) ("maildir:/Sent" "Sent messages" ?s)
("flag:unread AND NOT flag:trashed" "Unread messages" ?U) ("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) message-send-mail-function 'smtpmail-send-it)
#+END_SRC #+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 *** Visual Configuration
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: User-Configuration-Mu4e-Visual-Configuration-34f56f7e :CUSTOM_ID: User-Configuration-Mu4e-Visual-Configuration-34f56f7e