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)
(defvar mu4e-headers-sort-field :date
"Field to sort the headers by.
Field must be a symbol, one of: :date, :subject, :size, :prio,
:from, :to.")
"Field to sort the headers by. Must be a symbol,
one of: `:date', `:subject', `:size', `:prio', `:from', `:to.',
`:list-id'")
(defvar mu4e-headers-sort-direction 'descending
"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
'( ("date" . :date)
("from" . :from)
("list" . :list-id)
("maildir" . :maildir)
("prio" . :prio)
("zsize" . :size)

View File

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