Alexander-Miller / mu4e-column-faces

GNU General Public License v3.0
33 stars 8 forks source link

"Invalid face reference: ..." messages #2

Closed fintelkai closed 3 years ago

fintelkai commented 3 years ago

Thank you for this package. I notice that for every message that mu4e displays, there is a warning in my *Messages* buffer: Invalid face reference: followed with the plain text name of the sender of the message.

My possibly relevant header settings:

(setq mu4e-use-fancy-chars t)
(setq mu4e-headers-include-related nil)
(setq mu4e-headers-date-format "%Y-%m-%d %H:%M")
(setq mu4e-headers-fields '((:date . 18)
                            (:maildir . 12)
                            (:from-or-to . 22)
                            (:subject . 49)))

Do you have any idea of what might be happening, or how I can troubleshoot this?

Alexander-Miller commented 3 years ago

Apply the following change and then see what it outputs:

modified   mu4e-column-faces.el
@@ -141,7 +141,9 @@ the message flags in included in `mu4e-column-faces--apply-face'."
             (val (if width (mu4e~headers-truncate-field field val width) val))
             (face (mu4e-column-faces--determine-face (car ,f-w) ,msg)))
        (when face
+         (message "Found face %s" face)
          (put-text-property 0 (length val) 'face face val))
+       (message "Returning Value %s" val)
        val))))

Most of the functions are inlined so you will need to use eval-buffer for the changes to apply properly.

Also do you see the new faces applied at all?

fintelkai commented 3 years ago

Thanks. I applied the changes and restarted emacs, restarted mu4e, and opened a mailbox with the github notification from you and one other message:

Found face mu4e-column-faces-date
Returning Value 2021-08-12 12:20  
Found face mu4e-column-faces-maildir
Returning Value /+SaneCC    
Found face Alexander-Miller
Returning Value Alexander-Miller      
Invalid face reference: Alexander-Miller [2 times]
Found face mu4e-header-face
Returning Value Re: [Alexander-Miller/mu4e-column-faces] "Invalid
Found face mu4e-column-faces-date
Returning Value 2021-08-12 02:53  
Found face mu4e-column-faces-maildir
Returning Value /+SaneCC    
Found face Kyle Hammet Blumberg
Returning Value Kyle Hammet Blumberg  
Invalid face reference: Kyle Hammet Blumberg [2 times]
Found face mu4e-replied-face
Returning Value Re: want                                         
[mu4e] Found 2 matching messages
Invalid face reference: Alexander-Miller
Invalid face reference: Kyle Hammet Blumberg
Invalid face reference: Alexander-Miller
Invalid face reference: Kyle Hammet Blumberg
Alexander-Miller commented 3 years ago

Found the problem, I was doing the wrong thing for :from-or-to columns. The fix is up, let me know if everything works now.

fintelkai commented 3 years ago

Yes, the problem is gone. Thanks!