Re: [PATCH v4 13/16] add indexopts to notmuch python bindings.
[notmuch-archives.git] / c5 / 26413314116cc9d4628c9c3bd49c400525c5d6
1 Return-Path: <jani@nikula.org>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 8B87E431FC0\r
6         for <notmuch@notmuchmail.org>; Tue,  2 Oct 2012 13:18:17 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id Vz8PLPghhA9I for <notmuch@notmuchmail.org>;\r
16         Tue,  2 Oct 2012 13:18:16 -0700 (PDT)\r
17 Received: from mail-qc0-f181.google.com (mail-qc0-f181.google.com\r
18         [209.85.216.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 59837431FBD\r
21         for <notmuch@notmuchmail.org>; Tue,  2 Oct 2012 13:18:16 -0700 (PDT)\r
22 Received: by mail-qc0-f181.google.com with SMTP id x40so6183217qcp.26\r
23         for <notmuch@notmuchmail.org>; Tue, 02 Oct 2012 13:18:16 -0700 (PDT)\r
24 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
25         d=google.com; s=20120113;\r
26         h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references\r
27         :x-gm-message-state;\r
28         bh=gErQ33LhLmCiLz5SlCFgl7kq4SsynwBoXmOn/B1y2IU=;\r
29         b=NfRMBCrAj+9bYuaeN+kTxL79f7JTATFhrhnZC76jmt2eDwscInCkYdUdjZX7kvFa7L\r
30         dW+rq5YkaCeMQeJA/VSkGSFF6wKSMTwgex5ABjx3QhhlRNRjAQjZXWIgAVvnYzMcawYe\r
31         6hORwfWjb9mYe1dSgKLUjnU1bIf/TmVm8mFaAkvDPjwjJt6ReN9An6CwM6yJ0LH1lSmn\r
32         TxQb60nRUrSEH9+V9PWSWPIL32QiWkRZTD21jmd4P/rWbgWiD7v4K8pSjhJrEu7SRQRW\r
33         K0TzpUKNd6mJusfE/ZGLeQbi2Hs2G/V5QSJtwczPpw05QCI18EEFb1ZQGa2JajKenanJ\r
34         vifw==\r
35 Received: by 10.49.59.82 with SMTP id x18mr7678668qeq.9.1349209096102;\r
36         Tue, 02 Oct 2012 13:18:16 -0700 (PDT)\r
37 Received: from localhost ([2001:4b98:dc0:43:216:3eff:fe1b:25f3])\r
38         by mx.google.com with ESMTPS id ck11sm2295914qab.17.2012.10.02.13.18.15\r
39         (version=SSLv3 cipher=OTHER); Tue, 02 Oct 2012 13:18:15 -0700 (PDT)\r
40 From: Jani Nikula <jani@nikula.org>\r
41 To: notmuch@notmuchmail.org\r
42 Subject: [PATCH 2/2] emacs: add support for defining custom sort order for\r
43         saved searches\r
44 Date: Tue,  2 Oct 2012 22:18:03 +0200\r
45 Message-Id: <1349209083-7170-3-git-send-email-jani@nikula.org>\r
46 X-Mailer: git-send-email 1.7.2.5\r
47 In-Reply-To: <1349209083-7170-1-git-send-email-jani@nikula.org>\r
48 References: <1349209083-7170-1-git-send-email-jani@nikula.org>\r
49 X-Gm-Message-State:\r
50  ALoCoQnDCNmQs701/We4W+bYGWKiZzJq2jvJYivvyXKir9xZgxyXdTE3EOBSddy9kPvPeY5BNIpM\r
51 X-BeenThere: notmuch@notmuchmail.org\r
52 X-Mailman-Version: 2.1.13\r
53 Precedence: list\r
54 List-Id: "Use and development of the notmuch mail system."\r
55         <notmuch.notmuchmail.org>\r
56 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
57         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
58 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
59 List-Post: <mailto:notmuch@notmuchmail.org>\r
60 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
61 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
62         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
63 X-List-Received-Date: Tue, 02 Oct 2012 20:18:18 -0000\r
64 \r
65 Add a new customization option notmuch-saved-searches-oldest-first to\r
66 define custom sort order for saved searches. Do this as a separate\r
67 option from notmuch-saved-searches to dodge backwards compatibility\r
68 issues.\r
69 \r
70 NOTES:\r
71 \r
72 If the name of a tag matches the name of a saved search with a custom\r
73 sort order, then the search for that tag using the all tags section of\r
74 notmuch-hello will use the custom sort order too.\r
75 \r
76 If you change any sort orders, you must refresh notmuch-hello for the\r
77 changes to take effect.\r
78 \r
79 Only searches initiated from notmuch-hello will be affected.\r
80 ---\r
81  emacs/notmuch-hello.el |    6 +++++-\r
82  emacs/notmuch-lib.el   |    9 +++++++++\r
83  2 files changed, 14 insertions(+), 1 deletions(-)\r
84 \r
85 diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el\r
86 index 532f06d..e410357 100644\r
87 --- a/emacs/notmuch-hello.el\r
88 +++ b/emacs/notmuch-hello.el\r
89 @@ -433,7 +433,11 @@ Such a list can be computed with `notmuch-hello-query-counts'."\r
90                 (widget-create 'push-button\r
91                                :notify #'notmuch-hello-widget-search\r
92                                :notmuch-search-terms query\r
93 -                              :notmuch-search-oldest-first notmuch-search-oldest-first\r
94 +                              :notmuch-search-oldest-first\r
95 +                              (let ((m (assoc\r
96 +                                        name\r
97 +                                        notmuch-saved-searches-oldest-first)))\r
98 +                                (if m (cdr m) notmuch-search-oldest-first))\r
99                                name)\r
100                 (setq column-indent\r
101                       (1+ (max 0 (- column-width (length name)))))))\r
102 diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el\r
103 index 69867ad..e1cd7d2 100644\r
104 --- a/emacs/notmuch-lib.el\r
105 +++ b/emacs/notmuch-lib.el\r
106 @@ -82,6 +82,15 @@\r
107    :type '(alist :key-type string :value-type string)\r
108    :group 'notmuch-hello)\r
109  \r
110 +(defcustom notmuch-saved-searches-oldest-first nil\r
111 +  "List of saved searches with custom sort order.\r
112 +\r
113 +For each saved search name appearing in the list, use t for\r
114 +oldest-first, nil for newest-first. Saved searches not present in\r
115 +this list will use `notmuch-search-oldest-first' sort order."\r
116 +  :type '(alist :key-type string :value-type boolean)\r
117 +  :group 'notmuch-hello)\r
118 +\r
119  (defcustom notmuch-archive-tags '("-inbox")\r
120    "List of tag changes to apply to a message or a thread when it is archived.\r
121  \r
122 -- \r
123 1.7.2.5\r
124 \r