mu4e: allow sorting by list-id

Added support for sorting by mailing-list; note that this ultimately is
a sort by the 'list-id', so the items will be in that alphabetical
order, which is not necessarily the same as the order of the friendly
names.
This commit is contained in:
djcb 2017-07-02 10:31:21 +03:00
parent 588d227171
commit 81294eb17b
2 changed files with 11 additions and 5 deletions

View File

@ -206,9 +206,9 @@ but also manually invoked searches."
:group 'mu4e-headers) :group 'mu4e-headers)
(defvar mu4e-headers-sort-field :date (defvar mu4e-headers-sort-field :date
"Field to sort the headers by. "Field to sort the headers by. Must be a symbol,
Field must be a symbol, one of: :date, :subject, :size, :prio, one of: `:date', `:subject', `:size', `:prio', `:from', `:to.',
:from, :to.") `:list-id'")
(defvar mu4e-headers-sort-direction 'descending (defvar mu4e-headers-sort-direction 'descending
"Direction to sort by; a symbol either `descending' (sorting "Direction to sort by; a symbol either `descending' (sorting
@ -291,6 +291,7 @@ followed by the docid, followed by `mu4e~headers-docid-post'.")
(defvar mu4e~headers-sort-field-choices (defvar mu4e~headers-sort-field-choices
'( ("date" . :date) '( ("date" . :date)
("from" . :from) ("from" . :from)
("list" . :list-id)
("maildir" . :maildir) ("maildir" . :maildir)
("prio" . :prio) ("prio" . :prio)
("zsize" . :size) ("zsize" . :size)

View File

@ -745,11 +745,16 @@ mu4e-compose-mode."
:shortname "Maildir" :shortname "Maildir"
:help "Maildir for this message" :help "Maildir for this message"
:sortable t)) :sortable t))
(:list .
( :name "List-Id"
:shortname "List"
:help "Mailing list id for this message"
:sortable t))
(:mailing-list . (:mailing-list .
( :name "List" ( :name "List"
:shortname "List" :shortname "List"
:help "Mailing list for this message" :help "Mailing list friendly name for this message"
:sortable nil)) :sortable :list))
(:message-id . (:message-id .
( :name "Message-Id" ( :name "Message-Id"
:shortname "MsgID" :shortname "MsgID"