From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 101866DE1034 for ; Mon, 25 Sep 2017 22:36:56 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.014 X-Spam-Level: X-Spam-Status: No, score=-0.014 tagged_above=-999 required=5 tests=[AWL=0.095, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FSL_HELO_NON_FQDN_1=0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id I-aFlB0-aQ1z for ; Mon, 25 Sep 2017 22:36:55 -0700 (PDT) Received: from charon (jb55.com [45.79.91.128]) by arlo.cworth.org (Postfix) with ESMTPS id 6B96E6DE10E8; Mon, 25 Sep 2017 22:36:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d= jb55.com; h=from:to:subject:date:message-id; s=default; bh=ea0AzE9J61TdzLeOTbcWNMwicrxerzkL7J9EqjzaMPM=; b=JvWFFYNG5NU6haZqrVn4IRPBSWUzt5V+uaBFCEtomhKabO+9ErhKW/4RXlol8zZrLTm6Eu40DKqiq9Yi0vCYQpeUQW+tTcp5pt4E2DHSaPKePZgiaEfXGrwVppfVhuSawpYG0/6VD2E9xd3Un79MCzxrIH9wb7G+fffEu4FCaHErGosQ1F/MHw7m/EOPreBhEGYv+6YgvqVBxmOokCWhAIw2+cHHPxUOCfUOoU3zpcZmakm9fisH7+VOaWDlazyEU8c/bfThgSz9/50oMGV0DXfIKx91+7VYWjUBUH6zIDb1mJwX5oHFrv3+11YDggDkKKWoeKc8vruRFdmyhODV4g== Received: from jb55.com (70-36-49-138.dyn.novuscom.net [70.36.49.138]) by jb55.com (OpenSMTPD) with ESMTPSA id 092f8b03 TLS version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Tue, 26 Sep 2017 05:36:44 +0000 (UTC) From: William Casarin To: notmuch@notmuchmail.org Subject: [PATCH 5/6] emacs: notmuch-search-orders Date: Mon, 25 Sep 2017 22:35:46 -0700 Message-Id: <20170926053547.18564-6-jb55@jb55.com> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20170926053547.18564-1-jb55@jb55.com> References: <20170926053547.18564-1-jb55@jb55.com> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Sep 2017 05:36:56 -0000 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