mu/mu4e: tweak :list vs :mailing list

This commit is contained in:
Dirk-Jan C. Binnema 2022-05-07 20:48:21 +03:00
parent a03c573355
commit 48311ea18d
3 changed files with 7 additions and 4 deletions

View File

@ -320,7 +320,7 @@ static constexpr std::array<Field, Field::id_size()>
{
Field::Id::MailingList,
Field::Type::String,
"mailing-list", "list",
"list", {},
"Mailing list (List-Id:)",
"list:mu-discuss.example.com",
'v',

View File

@ -561,7 +561,7 @@ found."
;; so limit subject length to 600
(truncate-string-to-width val 600)))
(:thread-subject (mu4e~headers-thread-subject msg))
((:maildir :path :message-id) val)
((:maildir :path :message-id :list) val)
((:to :from :cc :bcc) (mu4e~headers-contact-str val))
;; if we (ie. `user-mail-address' is the 'From', show
;; 'To', otherwise show From
@ -1387,7 +1387,7 @@ matching messages with that mark."
("to" . :to)
("cc" . :cc)
("bcc" . :bcc)
("list" . :mailing-list))))
("list" . :list))))
(pattern (read-string
(mu4e-format "Regexp:")
nil 'mu4e~headers-regexp-hist)))

View File

@ -778,8 +778,11 @@ determine which browser function to use."
(dolist (field mu4e-view-fields)
(let ((fieldval (mu4e-message-field msg field)))
(pcase field
((or ':path ':maildir ':user-agent ':mailing-list ':message-id)
((or ':path ':maildir :list ':user-agent ':message-id)
(mu4e~view-gnus-insert-header field fieldval))
(':mailing-list
(let ((list (plist-get msg :list)))
(if list (mu4e-get-mailing-list-shortname list) "")))
((or ':flags ':tags)
(let ((flags (mapconcat (lambda (flag)
(if (symbolp flag)