diff options
author | Mark Walters <markwalters1009@gmail.com> | 2014-04-06 06:44:49 +0100 |
---|---|---|
committer | David Bremner <david@tethera.net> | 2014-04-11 10:27:26 -0300 |
commit | f225ee59ebdbd6961a0665f7e912825fbcc691d1 (patch) | |
tree | e9d7d1e9558d3bf48e22ddf57b873236fcfe405b /emacs/notmuch-lib.el | |
parent | 355d24fb94d0520a9c19201ea04cd52f272f1f19 (diff) |
emacs: Add a sort-order option to saved-searches
This adds a sort-order option to saved-searches, stores it in the
saved-search buttons (widgets), and uses the stored value when the
button is pressed.
Storing the sort-order in the widget was suggested by Jani in
id:4c3876274126985683e888641b29cf18142a5eb8.1391771337.git.jani@nikula.org.
Diffstat (limited to 'emacs/notmuch-lib.el')
-rw-r--r-- | emacs/notmuch-lib.el | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index a54a055e..3a3c69d3 100644 --- a/emacs/notmuch-lib.el +++ b/emacs/notmuch-lib.el @@ -125,7 +125,12 @@ searches so they still work in customize." (group :format "%v" :inline t (const :format " Query: " :query) (string :format "%v"))) (checklist :inline t :format "%v" - (group :format "%v" :inline t (const :format "Count-Query: " :count-query) (string :format "%v"))))) + (group :format "%v" :inline t (const :format "Count-Query: " :count-query) (string :format "%v")) + (group :format "%v" :inline t (const :format "" :sort-order) + (choice :tag " Sort Order" + (const :tag "Default" nil) + (const :tag "Oldest-first" oldest-first) + (const :tag "Newest-first" newest-first)))))) (defcustom notmuch-saved-searches '((:name "inbox" :query "tag:inbox") (:name "unread" :query "tag:unread")) @@ -139,6 +144,9 @@ a plist. Supported properties are :count-query Optional extra query to generate the count shown. If not present then the :query property is used. + :sort-order Specify the sort order to be used for the search. + Possible values are 'oldest-first 'newest-first or + nil. Nil means use the default sort order. Other accepted forms are a cons cell of the form (NAME . QUERY) or a list of the form (NAME QUERY COUNT-QUERY)." |