Re: [PATCH v6 00/17] Fix 'notmuch new' atomicity issues
[notmuch-archives.git] / 11 / f132da5251d83cfc387f966db0054dd87468b5
1 Return-Path: <keithp@keithp.com>\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 558124196F0\r
6         for <notmuch@notmuchmail.org>; Mon,  3 May 2010 13:58:39 -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: -1.9\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5\r
12         tests=[BAYES_00=-1.9] autolearn=ham\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 6uWWtOAN4jNA for <notmuch@notmuchmail.org>;\r
16         Mon,  3 May 2010 13:58:38 -0700 (PDT)\r
17 Received: from keithp.com (home.keithp.com [63.227.221.253])\r
18         by olra.theworths.org (Postfix) with ESMTP id 1745F431FC1\r
19         for <notmuch@notmuchmail.org>; Mon,  3 May 2010 13:58:38 -0700 (PDT)\r
20 Received: from localhost (localhost [127.0.0.1])\r
21         by keithp.com (Postfix) with ESMTP id 244857601D8\r
22         for <notmuch@notmuchmail.org>; Mon,  3 May 2010 13:58:37 -0700 (PDT)\r
23 X-Virus-Scanned: Debian amavisd-new at keithp.com\r
24 Received: from keithp.com ([127.0.0.1])\r
25         by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024)\r
26         with LMTP id 0tw0Dt7esqGA; Mon,  3 May 2010 13:58:33 -0700 (PDT)\r
27 Received: by keithp.com (Postfix, from userid 1033)\r
28         id CAFE37601D4; Mon,  3 May 2010 13:58:33 -0700 (PDT)\r
29 Received: from koto.keithp.com (localhost [127.0.0.1])\r
30         by keithp.com (Postfix) with ESMTP id AD0C2760175;\r
31         Mon,  3 May 2010 13:58:33 -0700 (PDT)\r
32 Received: by koto.keithp.com (Postfix, from userid 1488)\r
33         id D92D211C286; Mon,  3 May 2010 13:58:31 -0700 (PDT)\r
34 From: Keith Packard <keithp@keithp.com>\r
35 To: notmuch@notmuchmail.org\r
36 Subject: [PATCH] Customize saved search order separately from regular search\r
37         order\r
38 Date: Mon,  3 May 2010 13:58:27 -0700\r
39 Message-Id: <1272920307-25995-1-git-send-email-keithp@keithp.com>\r
40 X-Mailer: git-send-email 1.7.0.4\r
41 X-BeenThere: notmuch@notmuchmail.org\r
42 X-Mailman-Version: 2.1.13\r
43 Precedence: list\r
44 List-Id: "Use and development of the notmuch mail system."\r
45         <notmuch.notmuchmail.org>\r
46 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
47         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
48 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
49 List-Post: <mailto:notmuch@notmuchmail.org>\r
50 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
51 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
52         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
53 X-List-Received-Date: Mon, 03 May 2010 20:58:39 -0000\r
54 \r
55 I use 'saved searches' as a folder mechanism and want them to be shown\r
56 oldest first. Otherwise, while searching for messages normally, I want\r
57 to see the most recent messages first. This patch makes these two\r
58 default search orders separate.\r
59 \r
60 Signed-off-by: Keith Packard <keithp@keithp.com>\r
61 ---\r
62  emacs/notmuch-hello.el |    7 ++++++-\r
63  1 files changed, 6 insertions(+), 1 deletions(-)\r
64 \r
65 diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el\r
66 index 6a1c56e..f44b1d3 100644\r
67 --- a/emacs/notmuch-hello.el\r
68 +++ b/emacs/notmuch-hello.el\r
69 @@ -37,6 +37,11 @@\r
70    :type 'integer\r
71    :group 'notmuch)\r
72  \r
73 +(defcustom notmuch-saved-search-oldest-first t\r
74 +  "Whether saved searches should be oldest first."\r
75 +  :type 'boolean\r
76 +  :group 'notmuch)\r
77 +\r
78  (defcustom notmuch-show-empty-saved-searches nil\r
79    "Should saved searches with no messages be listed?"\r
80    :type 'boolean\r
81 @@ -140,7 +145,7 @@ diagonal."\r
82  (defun notmuch-hello-widget-search (widget &rest ignore)\r
83    (notmuch-search (widget-get widget\r
84                               :notmuch-search-terms)\r
85 -                 notmuch-search-oldest-first\r
86 +                 notmuch-saved-search-oldest-first\r
87                   nil nil #'notmuch-hello-search-continuation))\r
88  \r
89  (defun notmuch-saved-search-count (search)\r
90 -- \r
91 1.7.0.4\r
92 \r