mirror of https://github.com/djcb/mu.git
* improvements in the :mailing-list field
This commit is contained in:
parent
e387311c72
commit
382ccc2e2e
|
@ -387,9 +387,9 @@ date. The formats used for date and time are
|
|||
|
||||
(defsubst mu4e~headers-mailing-list (list)
|
||||
"Get some identifier for the mailing list."
|
||||
(let* ((short (and list (mu4e-get-mailing-list-shortname list))))
|
||||
(if short
|
||||
(propertize (or short "List") 'help-echo list) "")))
|
||||
(if list
|
||||
(propertize (mu4e-get-mailing-list-shortname list) 'help-echo list)
|
||||
""))
|
||||
|
||||
;; note: this function is very performance-sensitive
|
||||
(defun mu4e~headers-header-handler (msg &optional point)
|
||||
|
|
|
@ -73,7 +73,8 @@
|
|||
("unicode.sarasvati.unicode.org" . "Unicode")
|
||||
("xapian-discuss.lists.xapian.org" . "Xapian")
|
||||
("xdg.lists.freedesktop.org" . "XDG")
|
||||
("wl-en.ml.gentei.org" . "WL")
|
||||
("wl-en.lists.airs.net" . "Wdrlust")
|
||||
("wl-en.ml.gentei.org" . "WdrLust")
|
||||
("zsh-users.zsh.org" . "ZshUsr"))
|
||||
"AList of mailing lists id -> shortname")
|
||||
|
||||
|
@ -82,4 +83,3 @@
|
|||
addition to the 'built-in' list `mu4e~user-lists'.")
|
||||
|
||||
(provide 'mu4e-lists)
|
||||
|
||||
|
|
|
@ -482,9 +482,11 @@ that has a live window), and vice versa."
|
|||
(dolist (cell mu4e-user-mailing-lists) (puthash (car cell) (cdr cell) mu4e~lists-hash)))
|
||||
(or
|
||||
(gethash list-id mu4e~lists-hash)
|
||||
;; if it's not in the db, take the part until the first dot.
|
||||
(when (string-match "\\([^.]*\\)\\." list-id)
|
||||
(match-string 1 list-id))))
|
||||
;; if it's not in the db, take the part until the first dot if there is one;
|
||||
;; otherwise just return the whole thing
|
||||
(if (string-match "\\([^.]*\\)\\." list-id)
|
||||
(match-string 1 list-id)
|
||||
list-id)))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
|
|
Loading…
Reference in New Issue