* mu4e-view.el: fixup display of contacts with control chars
This commit is contained in:
@ -312,8 +312,10 @@ at POINT, or if nil, at (point)."
|
|||||||
(mu4e~view-construct-header field
|
(mu4e~view-construct-header field
|
||||||
(mapconcat
|
(mapconcat
|
||||||
(lambda(c)
|
(lambda(c)
|
||||||
(let* ((name (car c))
|
(let* ((name (when (car c)
|
||||||
(email (cdr c))
|
(replace-regexp-in-string "[[:cntrl:]]" "" (car c))))
|
||||||
|
(email (when (cdr c)
|
||||||
|
(replace-regexp-in-string "[[:cntrl:]]" "" (cdr c))))
|
||||||
(short (or name email)) ;; name may be nil
|
(short (or name email)) ;; name may be nil
|
||||||
(long (if name (format "%s <%s>" name email) email))
|
(long (if name (format "%s <%s>" name email) email))
|
||||||
(map (make-sparse-keymap)))
|
(map (make-sparse-keymap)))
|
||||||
@ -673,11 +675,14 @@ FUNC should be a function taking two arguments:
|
|||||||
If the message is not New/Unread, do nothing."
|
If the message is not New/Unread, do nothing."
|
||||||
(when mu4e~view-msg
|
(when mu4e~view-msg
|
||||||
(let ((flags (mu4e-message-field mu4e~view-msg :flags))
|
(let ((flags (mu4e-message-field mu4e~view-msg :flags))
|
||||||
|
(msgid (mu4e-message-field mu4e~view-msg :message-id))
|
||||||
(docid (mu4e-message-field mu4e~view-msg :docid)))
|
(docid (mu4e-message-field mu4e~view-msg :docid)))
|
||||||
;; attached (embedded) messages don't have docids; leave them alone
|
;; attached (embedded) messages don't have docids; leave them alone
|
||||||
;; is it a new message
|
;; is it a new message
|
||||||
(when (and docid (or (member 'unread flags) (member 'new flags)))
|
(when (and docid (or (member 'unread flags) (member 'new flags)))
|
||||||
(mu4e~proc-move docid nil "+S-u-N")))))
|
;; mark /all/ messages with this message-id as read, so all copies of
|
||||||
|
;; this message will be marked as read.
|
||||||
|
(mu4e~proc-move msgid nil "+S-u-N")))))
|
||||||
|
|
||||||
(defun mu4e~view-fontify-cited ()
|
(defun mu4e~view-fontify-cited ()
|
||||||
"Colorize message content based on the citation level."
|
"Colorize message content based on the citation level."
|
||||||
|
|||||||
Reference in New Issue
Block a user