mu4e: allow sorting by _first_ tag

Fixes #2611
This commit is contained in:
Dirk-Jan C. Binnema 2024-01-02 00:24:03 +02:00
parent 8edddae977
commit ad04f16b09
2 changed files with 8 additions and 5 deletions

View File

@ -302,7 +302,8 @@ Foo\")."
. (:name "Tags" . (:name "Tags"
:shortname "Tags" :shortname "Tags"
:help "Tags for the message" :help "Tags for the message"
:sortable nil)) ;; sort by _first_ tag.
:sortable t))
(:thread-subject (:thread-subject
. (:name "Subject" . (:name "Subject"
:shortname "Subject" :shortname "Subject"
@ -313,9 +314,11 @@ Foo\")."
:shortname "To" :shortname "To"
:help "Recipient of the message" :help "Recipient of the message"
:sortable t))) :sortable t)))
"An alist of all possible header fields and information about them. "An alist of all possible header fields and information about them.
This is used in the user-interface (the column headers in the header list, and
the fields the message view). This is used in the user-interface (the column headers in the
header list, and the fields the message view).
Most fields should be self-explanatory. A special one is Most fields should be self-explanatory. A special one is
`:from-or-to', which is equal to `:from' unless `:from' matches `:from-or-to', which is equal to `:from' unless `:from' matches
@ -362,7 +365,7 @@ Note, `:sortable' is not supported for custom header fields.")
(+ (length (mu4e-message-field msg :to)) (+ (length (mu4e-message-field msg :to))
(length (mu4e-message-field msg :cc)))))))) (length (mu4e-message-field msg :cc))))))))
"A list of custom (user-defined) headers. "An alist of custom (user-defined) headers.
The format is similar to `mu4e-header-info', but adds a :function The format is similar to `mu4e-header-info', but adds a :function
property, which should point to a function that takes a message property, which should point to a function that takes a message
plist as argument, and returns a string. See the default value of plist as argument, and returns a string. See the default value of

View File

@ -2490,7 +2490,7 @@ As an example, suppose we would like to add a mark for tagging messages
'(tag '(tag
:char "g" :char "g"
:prompt "gtag" :prompt "gtag"
:ask-target (lambda () (read-string "What tag do you want to add?")) :ask-target (lambda () (read-string "What tag do you want to add? "))
:action (lambda (docid msg target) :action (lambda (docid msg target)
(mu4e-action-retag-message msg (concat "+" target))))) (mu4e-action-retag-message msg (concat "+" target)))))
@end lisp @end lisp