From ad04f16b0959475a6b79a4bd8d7bff7f5f0793fb Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Tue, 2 Jan 2024 00:24:03 +0200 Subject: [PATCH] mu4e: allow sorting by _first_ tag Fixes #2611 --- mu4e/mu4e-vars.el | 11 +++++++---- mu4e/mu4e.texi | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/mu4e/mu4e-vars.el b/mu4e/mu4e-vars.el index 43ee1396..6a95c326 100644 --- a/mu4e/mu4e-vars.el +++ b/mu4e/mu4e-vars.el @@ -302,7 +302,8 @@ Foo\")." . (:name "Tags" :shortname "Tags" :help "Tags for the message" - :sortable nil)) + ;; sort by _first_ tag. + :sortable t)) (:thread-subject . (:name "Subject" :shortname "Subject" @@ -313,9 +314,11 @@ Foo\")." :shortname "To" :help "Recipient of the message" :sortable t))) + "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 `: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 :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 property, which should point to a function that takes a message plist as argument, and returns a string. See the default value of diff --git a/mu4e/mu4e.texi b/mu4e/mu4e.texi index 74b30a7e..25b56e53 100644 --- a/mu4e/mu4e.texi +++ b/mu4e/mu4e.texi @@ -2490,7 +2490,7 @@ As an example, suppose we would like to add a mark for tagging messages '(tag :char "g" :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) (mu4e-action-retag-message msg (concat "+" target))))) @end lisp