[PATCH 6/8] CLI: refactor dumping of tags.
[notmuch-archives.git] / dd / 665b549cd887e6e41b78da28aac03c969cefb1
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 ED3CA429E26\r
6         for <notmuch@notmuchmail.org>; Fri,  2 Sep 2011 05:28:13 -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 SWp9nPxcv-rk for <notmuch@notmuchmail.org>;\r
16         Fri,  2 Sep 2011 05:28:13 -0700 (PDT)\r
17 Received: from mail-vx0-f181.google.com (mail-vx0-f181.google.com\r
18         [209.85.220.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 545E2431FD0\r
21         for <notmuch@notmuchmail.org>; Fri,  2 Sep 2011 05:28:13 -0700 (PDT)\r
22 Received: by vxh7 with SMTP id 7so2320210vxh.26\r
23         for <notmuch@notmuchmail.org>; Fri, 02 Sep 2011 05:28:10 -0700 (PDT)\r
24 Received: by 10.52.24.9 with SMTP id q9mr1072270vdf.54.1314966490302;\r
25         Fri, 02 Sep 2011 05:28:10 -0700 (PDT)\r
26 Received: from localhost (nikula.org [92.243.24.172])\r
27         by mx.google.com with ESMTPS id t6sm1406584vdf.16.2011.09.02.05.28.08\r
28         (version=TLSv1/SSLv3 cipher=OTHER);\r
29         Fri, 02 Sep 2011 05:28:09 -0700 (PDT)\r
30 From: Jani Nikula <jani@nikula.org>\r
31 To: notmuch@notmuchmail.org\r
32 Subject: [PATCH] emacs: Sort saved searches\r
33 Date: Fri,  2 Sep 2011 12:28:06 +0000\r
34 Message-Id: <1314966486-20708-1-git-send-email-jani@nikula.org>\r
35 X-Mailer: git-send-email 1.7.1\r
36 X-BeenThere: notmuch@notmuchmail.org\r
37 X-Mailman-Version: 2.1.13\r
38 Precedence: list\r
39 List-Id: "Use and development of the notmuch mail system."\r
40         <notmuch.notmuchmail.org>\r
41 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
42         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
43 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
44 List-Post: <mailto:notmuch@notmuchmail.org>\r
45 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
46 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
47         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
48 X-List-Received-Date: Fri, 02 Sep 2011 12:28:14 -0000\r
49 \r
50 Display saved searches sorted, like tags are displayed.\r
51 \r
52 This only affects the display of the saved searches, not the order in which\r
53 they are stored in .emacs.\r
54 \r
55 Signed-off-by: Jani Nikula <jani@nikula.org>\r
56 ---\r
57  emacs/notmuch-hello.el |    3 +++\r
58  1 files changed, 3 insertions(+), 0 deletions(-)\r
59 \r
60 diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el\r
61 index 65fde75..13758e5 100644\r
62 --- a/emacs/notmuch-hello.el\r
63 +++ b/emacs/notmuch-hello.el\r
64 @@ -440,6 +440,9 @@ Complete list of currently available key bindings:\r
65              (widest (max saved-widest alltags-widest)))\r
66  \r
67         (when saved-alist\r
68 +         ;; Sort saved searches.\r
69 +         (setq saved-alist\r
70 +               (sort saved-alist (lambda (a b) (string< (car a) (car b)))))\r
71           (widget-insert "\nSaved searches: ")\r
72           (widget-create 'push-button\r
73                          :notify (lambda (&rest ignore)\r
74 -- \r
75 1.7.1\r
76 \r