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 17D94431FB6
\r
6 for <notmuch@notmuchmail.org>; Fri, 7 Feb 2014 03:26:14 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
8 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"
\r
12 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
13 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id JCChOQmfchXT for <notmuch@notmuchmail.org>;
\r
17 Fri, 7 Feb 2014 03:26:10 -0800 (PST)
\r
18 Received: from mail-qa0-f41.google.com (mail-qa0-f41.google.com
\r
19 [209.85.216.41]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id BA12C431FC2
\r
22 for <notmuch@notmuchmail.org>; Fri, 7 Feb 2014 03:26:06 -0800 (PST)
\r
23 Received: by mail-qa0-f41.google.com with SMTP id w8so4970038qac.14
\r
24 for <notmuch@notmuchmail.org>; Fri, 07 Feb 2014 03:26:06 -0800 (PST)
\r
25 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
\r
26 d=1e100.net; s=20130820;
\r
27 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
\r
28 :references:in-reply-to:references;
\r
29 bh=RxuJGdzFWCJQF/+e2AHTJ2mkGA7WPSJLJXvg1sMjTJs=;
\r
30 b=hCYILFht45NXVHVWawnJhs/cBlpU8roxMl6wUtpuAOn53aQb/6MhIfGh5h9HWjTqXX
\r
31 X3Quz9dTUkaB44ztYOrgf3PZg5FXtXC10Gtd6ooDT4kp16jQ5okB/qHeUZJX6K9VajFz
\r
32 V8575NCQGbhhWjnaptYUPwXKNE0VGeJWXv4XCwE7z27Cj3wM1kWC5bAgoNPwifrwz08Y
\r
33 fpnuuLPQlgyyoRQBGCW26w9WKCScL+jsQrlNZfI5a6/cVpSsF2F0FAJz6zQP6/40ti5Y
\r
34 eacUVOAlhIdGuS4FgkJDB3OKt1vDYQaBAkxWBuhPY64rNoRwuaJFxTs6nKE1SGgoBUjM
\r
37 ALoCoQnwJ/d5AD1e+buEVNwPz8ZR73cIyRwx72nI5sbDrJXE3T5f/sVLkEVkFjT418PqUrR5fKxu
\r
38 X-Received: by 10.140.109.72 with SMTP id k66mr19639364qgf.20.1391772366103;
\r
39 Fri, 07 Feb 2014 03:26:06 -0800 (PST)
\r
40 Received: from localhost ([2001:4b98:dc0:43:216:3eff:fe1b:25f3])
\r
41 by mx.google.com with ESMTPSA id s2sm12452340qat.1.2014.02.07.03.26.05
\r
42 for <multiple recipients>
\r
43 (version=TLSv1.1 cipher=RC4-SHA bits=128/128);
\r
44 Fri, 07 Feb 2014 03:26:05 -0800 (PST)
\r
45 From: Jani Nikula <jani@nikula.org>
\r
46 To: notmuch@notmuchmail.org,
\r
48 Subject: [PATCH 2/2] emacs: add support for defining custom sort order for
\r
50 Date: Fri, 7 Feb 2014 12:25:53 +0100
\r
52 <061c4bf44c9bd08ab69ca6dfcae9037101ff69a8.1391771337.git.jani@nikula.org>
\r
53 X-Mailer: git-send-email 1.7.2.5
\r
54 In-Reply-To: <1391727088-22172-1-git-send-email-cworth@cworth.org>
\r
55 References: <1391727088-22172-1-git-send-email-cworth@cworth.org>
\r
56 In-Reply-To: <cover.1391771337.git.jani@nikula.org>
\r
57 References: <cover.1391771337.git.jani@nikula.org>
\r
58 X-BeenThere: notmuch@notmuchmail.org
\r
59 X-Mailman-Version: 2.1.13
\r
61 List-Id: "Use and development of the notmuch mail system."
\r
62 <notmuch.notmuchmail.org>
\r
63 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
64 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
65 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
66 List-Post: <mailto:notmuch@notmuchmail.org>
\r
67 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
68 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
69 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
70 X-List-Received-Date: Fri, 07 Feb 2014 11:26:14 -0000
\r
72 Add a new customization option notmuch-saved-searches-oldest-first to
\r
73 define custom sort order for saved searches. Do this as a separate
\r
74 option from notmuch-saved-searches to dodge backwards compatibility
\r
79 If the name of a tag matches the name of a saved search with a custom
\r
80 sort order, then the search for that tag using the all tags section of
\r
81 notmuch-hello will use the custom sort order too.
\r
83 If you change any sort orders, you must refresh notmuch-hello for the
\r
84 changes to take effect.
\r
86 Only searches initiated from notmuch-hello will be affected.
\r
88 emacs/notmuch-hello.el | 6 +++++-
\r
89 emacs/notmuch-lib.el | 9 +++++++++
\r
90 2 files changed, 14 insertions(+), 1 deletions(-)
\r
92 diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
\r
93 index 1c30b47..530b3ac 100644
\r
94 --- a/emacs/notmuch-hello.el
\r
95 +++ b/emacs/notmuch-hello.el
\r
96 @@ -463,7 +463,11 @@ Such a list can be computed with `notmuch-hello-query-counts'."
\r
97 (widget-create 'push-button
\r
98 :notify #'notmuch-hello-widget-search
\r
99 :notmuch-search-terms query
\r
100 - :notmuch-search-oldest-first notmuch-search-oldest-first
\r
101 + :notmuch-search-oldest-first
\r
104 + notmuch-saved-searches-oldest-first)))
\r
105 + (if m (cdr m) notmuch-search-oldest-first))
\r
107 (setq column-indent
\r
108 (1+ (max 0 (- column-width (length name)))))))
\r
109 diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
\r
110 index fa35fa9..16d9a52 100644
\r
111 --- a/emacs/notmuch-lib.el
\r
112 +++ b/emacs/notmuch-lib.el
\r
113 @@ -113,6 +113,15 @@ Note that the recommended way of achieving the same is using
\r
114 :type '(alist :key-type string :value-type string)
\r
115 :group 'notmuch-hello)
\r
117 +(defcustom notmuch-saved-searches-oldest-first nil
\r
118 + "List of saved searches with custom sort order.
\r
120 +For each saved search name appearing in the list, use t for
\r
121 +oldest-first, nil for newest-first. Saved searches not present in
\r
122 +this list will use `notmuch-search-oldest-first' sort order."
\r
123 + :type '(alist :key-type string :value-type boolean)
\r
124 + :group 'notmuch-hello)
\r
126 (defcustom notmuch-archive-tags '("-inbox")
\r
127 "List of tag changes to apply to a message or a thread when it is archived.
\r