* improvements in the :mailing-list field

This commit is contained in:
djcb
2012-12-26 13:01:36 +02:00
parent e387311c72
commit 382ccc2e2e
3 changed files with 10 additions and 8 deletions

View File

@ -387,9 +387,9 @@ date. The formats used for date and time are
(defsubst mu4e~headers-mailing-list (list) (defsubst mu4e~headers-mailing-list (list)
"Get some identifier for the mailing list." "Get some identifier for the mailing list."
(let* ((short (and list (mu4e-get-mailing-list-shortname list)))) (if list
(if short (propertize (mu4e-get-mailing-list-shortname list) 'help-echo list)
(propertize (or short "List") 'help-echo list) ""))) ""))
;; note: this function is very performance-sensitive ;; note: this function is very performance-sensitive
(defun mu4e~headers-header-handler (msg &optional point) (defun mu4e~headers-header-handler (msg &optional point)

View File

@ -73,7 +73,8 @@
("unicode.sarasvati.unicode.org" . "Unicode") ("unicode.sarasvati.unicode.org" . "Unicode")
("xapian-discuss.lists.xapian.org" . "Xapian") ("xapian-discuss.lists.xapian.org" . "Xapian")
("xdg.lists.freedesktop.org" . "XDG") ("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")) ("zsh-users.zsh.org" . "ZshUsr"))
"AList of mailing lists id -> shortname") "AList of mailing lists id -> shortname")
@ -82,4 +83,3 @@
addition to the 'built-in' list `mu4e~user-lists'.") addition to the 'built-in' list `mu4e~user-lists'.")
(provide 'mu4e-lists) (provide 'mu4e-lists)

View File

@ -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))) (dolist (cell mu4e-user-mailing-lists) (puthash (car cell) (cdr cell) mu4e~lists-hash)))
(or (or
(gethash list-id mu4e~lists-hash) (gethash list-id mu4e~lists-hash)
;; if it's not in the db, take the part until the first dot. ;; if it's not in the db, take the part until the first dot if there is one;
(when (string-match "\\([^.]*\\)\\." list-id) ;; otherwise just return the whole thing
(match-string 1 list-id)))) (if (string-match "\\([^.]*\\)\\." list-id)
(match-string 1 list-id)
list-id)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;