diff --git a/configuration.org b/configuration.org index 4a933b9..2ce3de4 100644 --- a/configuration.org +++ b/configuration.org @@ -2250,6 +2250,22 @@ Then configure ~real-auto-save-mode~ ** Mailing with mu4e +Due to my programming (and maybe a bit of OCD) needs, i set trailing whitespace to have a red +background so it stands out *a lot*. However, many emails contain a lot of trailing whitespace +which makes them really hard to read in Emacs. + +The below snippet creates a trailing whitespace face specific to mu4e view buffers. The +accompanying function will be added to ~mu4e-view-mode-hook~. + +#+BEGIN_SRC emacs-lisp +(copy-face 'trailing-whitespace 'trailing-whitespace-mu4e) +(set-face-attribute 'trailing-whitespace-mu4e nil :background 'unspecified) + +(defun gpolonkai/mu4e-trailing-whitespace-fix () + (set (make-local-variable 'face-remapping-alist) + '((trailing-whitespace trailing-whitespace-mu4e)))) +#+END_SRC + #+BEGIN_SRC emacs-lisp (use-package mu4e :after helm @@ -2293,6 +2309,8 @@ Then configure ~real-auto-save-mode~ (mu4e-completing-read-function 'helm-comp-read) (mu4e-context-policy 'pick-first) (mu4e-confirm-quit nil) + :hook + (mu4e-view-mode . gpolonkai/mu4e-trailing-whitespace-fix) :bind (:map gpolonkai/pers-map ("m m" . mu4e)