summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirk-Jan C. Binnema <djcb@djcbsoftware.nl>2023-07-02 10:26:09 +0300
committerDirk-Jan C. Binnema <djcb@djcbsoftware.nl>2023-07-20 09:07:34 +0300
commitd5893ad38712894f583a5becef97ad90693d7848 (patch)
tree3044e1af6aac374d4ffd82fd6ed52e0baee43987
parent4954b6b4676659adbf38621b6704698d440c74ca (diff)
mu4e/search: clarify sortable fields (threading)
When threads are enabled, only sorting by date is possible; make this clearer in the UI. Fixes #2507.
-rw-r--r--mu4e/mu4e-search.el24
1 files changed, 15 insertions, 9 deletions
diff --git a/mu4e/mu4e-search.el b/mu4e/mu4e-search.el
index e212dd2..eaed0c1 100644
--- a/mu4e/mu4e-search.el
+++ b/mu4e/mu4e-search.el
@@ -410,16 +410,22 @@ status, STATUS."
FIELD is the field to sort by; DIR is a symbol: either
`ascending', `descending', t (meaning: if FIELD is the same as
the current sortfield, change the sort-order) or nil (ask the
-user)."
+user).
+
+When threads are enabled (`mu4e-search-threads'), you can only sort
+by the `:date' field."
(interactive)
- (let* ((choices '(("date" . :date)
- ("from" . :from)
- ("list" . :list)
- ("maildir" . :maildir)
- ("prio" . :prio)
- ("zsize" . :size)
- ("subject" . :subject)
- ("to" . :to)))
+ (let* ((choices ;; with threads enabled, you can only sort by *date*
+ (if mu4e-search-threads
+ '(("date" . :date))
+ '(("date" . :date)
+ ("from" . :from)
+ ("list" . :list)
+ ("maildir" . :maildir)
+ ("prio" . :prio)
+ ("zsize" . :size)
+ ("subject" . :subject)
+ ("to" . :to))))
(field
(or field
(mu4e-read-option "Sortfield: " choices)))