Re: A systematic way of handling Xapian lock errors?
[notmuch-archives.git] / 18 / 8a14b312247856cd0629aae1cb3e29ffdcb8b5
1 Return-Path: <markwalters1009@gmail.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 70625421197\r
6         for <notmuch@notmuchmail.org>; Sun, 12 Feb 2012 17:19:20 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0.201\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.201 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
14         RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
15 Received: from olra.theworths.org ([127.0.0.1])\r
16         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
17         with ESMTP id 6uPRIUvApt1p for <notmuch@notmuchmail.org>;\r
18         Sun, 12 Feb 2012 17:19:19 -0800 (PST)\r
19 Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com\r
20         [209.85.212.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
21         (No client certificate requested)\r
22         by olra.theworths.org (Postfix) with ESMTPS id B52B3421174\r
23         for <notmuch@notmuchmail.org>; Sun, 12 Feb 2012 17:19:15 -0800 (PST)\r
24 Received: by wibhi8 with SMTP id hi8so3615406wib.26\r
25         for <notmuch@notmuchmail.org>; Sun, 12 Feb 2012 17:19:14 -0800 (PST)\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
27         h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
28         bh=CVSor5E3TycdRNOUrxPLWmiELuptmyEPmhuSbKtODAQ=;\r
29         b=Bs+OoHDYwbS6GwUM6YROHS6/9Hy+5auV4Kdx53I3PVoJ5QF2RwWLH3Zt3jnA/oSzap\r
30         UWXDKUaotMTJsWNVQPL3znY0l6NDY6T6J0hgyRqtpMTYxDlNal/xlAFsnfnJsw2Up417\r
31         5ZMALaSQm8TuMhSaaX4yni1Q2QbnCKj0KB3Uc=\r
32 Received: by 10.180.101.37 with SMTP id fd5mr10698364wib.1.1329095954434;\r
33         Sun, 12 Feb 2012 17:19:14 -0800 (PST)\r
34 Received: from localhost (94-192-233-223.zone6.bethere.co.uk.\r
35  [94.192.233.223])      by mx.google.com with ESMTPS id\r
36  by3sm2815146wib.3.2012.02.12.17.19.13  (version=TLSv1/SSLv3 cipher=OTHER);\r
37         Sun, 12 Feb 2012 17:19:13 -0800 (PST)\r
38 From: Mark Walters <markwalters1009@gmail.com>\r
39 To: notmuch@notmuchmail.org\r
40 Subject: [RFC PATCH v3 02/11] cli: add sort options to notmuch-show.c\r
41 Date: Mon, 13 Feb 2012 01:20:06 +0000\r
42 Message-Id: <1329096015-8078-3-git-send-email-markwalters1009@gmail.com>\r
43 X-Mailer: git-send-email 1.7.2.3\r
44 In-Reply-To: <1329072579-27340-1-git-send-email-markwalters1009@gmail.com>\r
45 References: <1329072579-27340-1-git-send-email-markwalters1009@gmail.com>\r
46 X-BeenThere: notmuch@notmuchmail.org\r
47 X-Mailman-Version: 2.1.13\r
48 Precedence: list\r
49 List-Id: "Use and development of the notmuch mail system."\r
50         <notmuch.notmuchmail.org>\r
51 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
52         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
53 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
54 List-Post: <mailto:notmuch@notmuchmail.org>\r
55 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
56 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
57         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
58 X-List-Received-Date: Mon, 13 Feb 2012 01:19:20 -0000\r
59 \r
60 Add the option --sort=newest-first|oldest-first to notmuch-show. This\r
61 is used by notmuch-pick.el\r
62 ---\r
63  notmuch-show.c |    7 +++++++\r
64  1 files changed, 7 insertions(+), 0 deletions(-)\r
65 \r
66 diff --git a/notmuch-show.c b/notmuch-show.c\r
67 index 9d73685..8f6e520 100644\r
68 --- a/notmuch-show.c\r
69 +++ b/notmuch-show.c\r
70 @@ -1030,6 +1030,7 @@ notmuch_show_command (void *ctx, unused (int argc), unused (char *argv[]))\r
71      notmuch_query_t *query;\r
72      char *query_string;\r
73      int opt_index, ret;\r
74 +    notmuch_sort_t sort = NOTMUCH_SORT_NEWEST_FIRST;\r
75      const notmuch_show_format_t *format = &format_text;\r
76      notmuch_show_params_t params = { .part = -1 };\r
77      int format_sel = NOTMUCH_FORMAT_NOT_SPECIFIED;\r
78 @@ -1043,6 +1044,10 @@ notmuch_show_command (void *ctx, unused (int argc), unused (char *argv[]))\r
79                                   { "mbox", NOTMUCH_FORMAT_MBOX },\r
80                                   { "raw", NOTMUCH_FORMAT_RAW },\r
81                                   { 0, 0 } } },\r
82 +       { NOTMUCH_OPT_KEYWORD, &sort, "sort", 's',\r
83 +         (notmuch_keyword_t []){ { "oldest-first", NOTMUCH_SORT_OLDEST_FIRST },\r
84 +                                 { "newest-first", NOTMUCH_SORT_NEWEST_FIRST },\r
85 +                                 { 0, 0 } } },\r
86         { NOTMUCH_OPT_INT, &params.part, "part", 'p', 0 },\r
87         { NOTMUCH_OPT_BOOLEAN, &params.entire_thread, "entire-thread", 't', 0 },\r
88         { NOTMUCH_OPT_BOOLEAN, &params.decrypt, "decrypt", 'd', 0 },\r
89 @@ -1137,6 +1142,8 @@ notmuch_show_command (void *ctx, unused (int argc), unused (char *argv[]))\r
90         return 1;\r
91      }\r
92  \r
93 +    notmuch_query_set_sort (query, sort);\r
94 +\r
95      if (params.part >= 0)\r
96         ret = do_show_single (ctx, query, format, &params);\r
97      else\r
98 -- \r
99 1.7.2.3\r
100 \r