* better handling of mailing lists which are not in the shortcuts lists

This commit is contained in:
djcb 2012-12-22 11:48:02 +02:00
parent a287074f7b
commit 1e6b7792d6
2 changed files with 11 additions and 5 deletions

View File

@ -27,8 +27,7 @@
(defvar mu4e~mailing-lists
'(
("bbdb-info.lists.sourceforge.net" . "BBDB")
'( ("bbdb-info.lists.sourceforge.net" . "BBDB")
("boost-announce.lists.boost.org" . "BoostA")
("boost-interest.lists.boost.org" . "BoostI")
("conkeror.mozdev.org" . "Conkeror")
@ -66,6 +65,7 @@
("notmuch.notmuchmail.org" . "Notmuch")
("orbit-list.gnome.org" . "ORBit")
("pulseaudio-discuss.lists.freedesktop.org" . "PulseA")
("sqlite-announce.sqlite.org" . "SQliteAnn")
("sqlite-dev.sqlite.org" . "SQLiteDev")
("sup-talk.rubyforge.org" . "Sup")
("sylpheed-claws-users.lists.sourceforge.net" . "Sylpheed")
@ -73,6 +73,7 @@
("unicode.sarasvati.unicode.org" . "Unicode")
("xapian-discuss.lists.xapian.org" . "Xapian")
("xdg.lists.freedesktop.org" . "XDG")
("wl-en.ml.gentei.org" . "WL")
("zsh-users.zsh.org" . "ZshUsr"))
"AList of mailing lists id -> shortname")

View File

@ -470,8 +470,8 @@ that has a live window), and vice versa."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defvar mu4e~lists-hash nil
"Hashtable of mailing-list-id => shortname, based on `mu4e~mailing-lists'
and `mu4e-user-mailing-lists'.")
"Hashtable of mailing-list-id => shortname, based on
`mu4e~mailing-lists' and `mu4e-user-mailing-lists'.")
(defun mu4e-get-mailing-list-shortname (list-id)
"Get the shortname for a mailing-list with list-id LIST-ID. based on `mu4e~mailing-lists'
@ -480,7 +480,12 @@ that has a live window), and vice versa."
(setq mu4e~lists-hash (make-hash-table :test 'equal))
(dolist (cell mu4e~mailing-lists) (puthash (car cell) (cdr cell) mu4e~lists-hash))
(dolist (cell mu4e-user-mailing-lists) (puthash (car cell) (cdr cell) mu4e~lists-hash)))
(gethash list-id 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))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defvar mu4e-index-updated-hook nil