feat(emacs/mu4e): update config for current NixOS configuration

This commit is contained in:
Lucien Cartier-Tilet 2025-05-24 21:21:47 +02:00
parent 20ac94c9fb
commit 4a31230d16
Signed by: phundrak
SSH Key Fingerprint: SHA256:CE0HPsbW3L2YiJETx1zYZ2muMptaAqTN2g3498KrMkc

View File

@ -395,7 +395,7 @@ configuration for the ~mu4e~ package itself.
#+begin_src emacs-lisp
(use-package mu4e
:after all-the-icons
:straight (:build t)
:straight (:build nil)
:commands mu4e mu4e-compose-new
:init
(defun mu4e--main-action-str (name func)
@ -556,7 +556,7 @@ and how to retrieve them.
#+name: mu4e-mail-on-machine
#+begin_src emacs-lisp :tangle no
(setq mu4e-get-mail-command "mbsync -a"
mu4e-root-maildir "~/Mail"
mu4e-root-maildir (concat (getenv "HOME") "/Mail/lucien@phundrak.com/")
mu4e-trash-folder "/Trash"
mu4e-refile-folder "/Archive"
mu4e-sent-folder "/Sent"
@ -791,29 +791,6 @@ With this piece of code, I can simply jump to my inbox maildir with
(:maildir "/Trash" :key ?t)))
#+end_src
**** Dealing with spammers
Im sure you have received at least one email recently from a sketchy
email address asking you something that might be completely unrelated
to what you do, or at least somewhat related. Fortunately, [[https://twitter.com/Boris/status/1360208504544444417][we have a
hero]]! Now, let me write a function that will insert their
pre-written text at point to avoid me going back to their Twitter
thread each time I want to shut spammers up.
#+begin_src emacs-lisp
(defun reply-to-bill ()
(interactive)
(insert "Please forward this email to bill@noprocurement.com,
and delete my email, as Ill be changing jobs soon, and this
email address will no longer be active.
Bill Whiskoney is a senior partner at Nordic Procurement
Services, and he handles our budget and will help you further or
introduce you to someone who can."))
#+end_src
If you want the full story, make sure to read the whole thread, I
guarantee it, its worth your time! And in case the Twitter thread
disappear in the future, [[https://threader.app/thread/1360208504544444417][here is a backup]].
**** Getting Fancy
Im not a huge fan of mu4es default icons marking my emails, so Ill
redefine them as follows. Be aware the name of these icons are from
@ -1561,7 +1538,8 @@ excluded files.
eol)
,(rx "/"
(or "rsync" "ssh" "tmp" "yadm" "sudoedit" "sudo")
(* any)))))
(* any))
"/nix/.*")))
#+end_src
** Screenshot