Hi there,
There was this trick I was using to get different colors depending on the from address:
;;colors
(defvar mu4e-list-colors
'(
;;work
("xxx" . "#AFA")
))
(setq list (alist-keys mu4e-list-colors))
(defun mu4e~headers-line-apply-list-face (msg line)
"Adjust LINE's face property based on the color list."
(let* ((ml (downcase (cdar (mu4e-message-field msg :from))))
;;(face (if (assoc ml mu4e-list-colors)
;; (let ((color (assoc-default ml mu4e-list-colors)))
(res (xah-string-match-in-list-p ml list "no" 1))
(face (if res
(let ((color (assoc-default res mu4e-list-colors)))
;;`(:foreground ,color :background ,color))
`(:foreground ,color))
;;`(:foreground ,(face-attribute 'highlight :background))
`(:foreground ,(face-attribute 'mu4e-flagged-face :background))
;;`(:foreground "black" :background "black")
)))
(when (fboundp 'add-face-text-property)
(add-face-text-property 0 (length line) face t line))
;;(add-face-text-property 28 29 face t line))
line))
(add-to-list 'mu4e~headers-line-handler-functions
'mu4e~headers-line-apply-list-face)
But this doesn't work anymore with 1.6.
There's also this method with the font-lock:
(setq header-highlights
'(
(".*\\(mrX\\|mrsY\\).*" . email-dir-face)
))
(add-hook 'mu4e-headers-mode-hook
(lambda ()
(setq font-lock-defaults '(header-highlights))))
(defface email-dir
'((t :foreground "#FAA"))
"Face for mail headers"
:group 'basic-faces)
(setq email-dir-face 'email-dir)
Which is ok except this considers all the header row, and I'd like to use the from address.
So I have some questions!
- Do you have a working color filter for the header view working with 1.6?
- Is it possible to add the actual email addresses in the headers view? (in which case the font-lock method would still work ok)
Cheers!