From: William Casarin <jb55@jb55.com>
To: notmuch@notmuchmail.org
Subject: [PATCH 5/6] emacs: notmuch-search-orders
Date: Mon, 25 Sep 2017 22:35:46 -0700 [thread overview]
Message-ID: <20170926053547.18564-6-jb55@jb55.com> (raw)
In-Reply-To: <20170926053547.18564-1-jb55@jb55.com>
Create a notmuch-sort-orders alist to be shared between
notmuch-search-sort-orders and notmuch-change-search-order
---
emacs/notmuch-lib.el | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
index ee7b67d3..16725863 100644
--- a/emacs/notmuch-lib.el
+++ b/emacs/notmuch-lib.el
@@ -92,6 +92,14 @@ $PATH)."
:type 'string
:group 'notmuch-external)
+(setq notmuch-sort-orders
+ '(("Oldest-first" . oldest-first)
+ ("Newest-first" . newest-first)
+ ("Subject-ascending" . subject-ascending)
+ ("Subject-descending" . subject-descending)
+ ("From-ascending" . from-ascending)
+ ("From-descending" . from-descending)))
+
(defcustom notmuch-search-sort-order 'oldest-first
"Show the oldest mail first when searching.
@@ -99,13 +107,10 @@ This variable defines the default sort order for displaying
search results. Note that any filtered searches created by
`notmuch-search-filter' retain the search order of the parent
search."
- :type '(choice :tag " Sort Order"
- (const :tag "Oldest-first" oldest-first)
- (const :tag "Newest-first" newest-first)
- (const :tag "Subject-ascending" subject-ascending)
- (const :tag "Subject-descending" subject-descending)
- (const :tag "From-ascending" from-ascending)
- (const :tag "From-descending" from-descending))
+ :type (append '(choice :tag " Sort Order")
+ (mapcar (lambda (pair)
+ `(const :tag ,(car pair) ,(cdr pair)))
+ notmuch-sort-orders))
:group 'notmuch-search)
(defcustom notmuch-poll-script nil
--
2.13.2
next prev parent reply other threads:[~2017-09-26 5:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-26 5:35 [PATCH 0/6] Sort by from and subject William Casarin
2017-09-26 5:35 ` [PATCH 1/6] sorting: add the ability to sort " William Casarin
2017-09-26 5:35 ` [PATCH 2/6] sorting: update ruby bindings for " William Casarin
2017-09-26 5:35 ` [PATCH 3/6] sorting: update man page William Casarin
2017-09-26 5:35 ` [PATCH 4/6] emacs: replace oldest-first with sort-order William Casarin
2017-09-26 5:35 ` William Casarin [this message]
2017-09-26 5:35 ` [PATCH 6/6] emacs: add notmuch-search-change-order William Casarin
2017-09-30 10:10 ` [PATCH 0/6] Sort by from and subject Jani Nikula
2017-09-30 14:55 ` William Casarin
2017-09-30 15:29 ` Jani Nikula
2017-09-30 16:03 ` Mark Walters
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170926053547.18564-6-jb55@jb55.com \
--to=jb55@jb55.com \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).