From: Frederik Vanrenterghem Date: Fri, 3 May 2024 14:50:03 +0000 (+0800) Subject: Show spam status in mu4e message view. X-Git-Url: http://git.vanrenterghem.biz/Dotty.git/commitdiff_plain/ce959d4594c8fa4e0776c182ff2e02356e8a9d1f?ds=sidebyside;hp=c706ed750a21e7e8b6bd8929079615e1aceed62d Show spam status in mu4e message view. --- diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el index 4d58dfe..51f86f1 100644 --- a/emacs/.emacs.d/init.el +++ b/emacs/.emacs.d/init.el @@ -135,7 +135,18 @@ (setq mu4e-sent-folder "/Sent" mu4e-drafts-folder "/Drafts" mu4e-trash-folder "/Trash") - +;; Create custom spam status header and show in message view +(add-to-list 'mu4e-header-info-custom + '(:spam-status . + ( :name "Spam-Status" ;; long name, as seen in the message-view + :shortname "Spam" ;; short name, as seen in the headers view + :help "The Spam status" ;; tooltip + ;; uses mu4e-fetch-field which is rel. slow, so only appropriate + ;; for mu4e-view-fields, and _not_ mu4e-headers-fields + :function (lambda (msg) + (or (string-join (seq-take (split-string (mu4e-fetch-field msg "X-Spam-Status") " ") 2) " ") ""))))) +(add-to-list 'mu4e-view-fields :spam-status) +b ;; Load configuration for website ;(load "mustache-html")