Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / e3 / 5838c3a1119e2e9fe9de94198b1a9d915254c2
1 Return-Path: <todd@electricoding.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 8E1A0431FDE\r
6         for <notmuch@notmuchmail.org>; Thu, 15 Jan 2015 16:31:07 -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
9 X-Spam-Flag: NO\r
10 X-Spam-Score: 2.438\r
11 X-Spam-Level: **\r
12 X-Spam-Status: No, score=2.438 tagged_above=-999 required=5\r
13         tests=[DNS_FROM_AHBL_RHSBL=2.438] 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 6II8-nvJtZ8y for <notmuch@notmuchmail.org>;\r
17         Thu, 15 Jan 2015 16:31:04 -0800 (PST)\r
18 Received: from s75.web-hosting.com (s75.web-hosting.com [198.187.31.9])\r
19         (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id 53753431FD9\r
22         for <notmuch@notmuchmail.org>; Thu, 15 Jan 2015 16:31:04 -0800 (PST)\r
23 Received: from user-69-73-37-128.knology.net ([69.73.37.128]:60097\r
24         helo=localhost.localdomain)\r
25         by server75.web-hosting.com with esmtpsa (UNKNOWN:AES128-SHA256:128)\r
26         (Exim 4.82) (envelope-from <todd@electricoding.com>)\r
27         id 1YBuoZ-003S2e-CD; Thu, 15 Jan 2015 19:31:03 -0500\r
28 From: Todd <todd@electricoding.com>\r
29 To: notmuch@notmuchmail.org\r
30 Subject: [PATCH v3 2/5] Add the NOTMUCH_FEATURE_INDEXED_MIMETYPES database\r
31         feature\r
32 Date: Thu, 15 Jan 2015 18:30:26 -0600\r
33 Message-Id: <1421368229-4360-2-git-send-email-todd@electricoding.com>\r
34 X-Mailer: git-send-email 1.9.1\r
35 In-Reply-To: <1421368229-4360-1-git-send-email-todd@electricoding.com>\r
36 References: <1421368229-4360-1-git-send-email-todd@electricoding.com>\r
37 In-Reply-To: <1420849787-4401-1-git-send-email-todd@electricoding.com>\r
38 References: <1420849787-4401-1-git-send-email-todd@electricoding.com>\r
39 X-AntiAbuse: This header was added to track abuse,\r
40         please include it with any abuse report\r
41 X-AntiAbuse: Primary Hostname - server75.web-hosting.com\r
42 X-AntiAbuse: Original Domain - notmuchmail.org\r
43 X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]\r
44 X-AntiAbuse: Sender Address Domain - electricoding.com\r
45 X-Get-Message-Sender-Via: server75.web-hosting.com: authenticated_id:\r
46         todd@electricoding.com\r
47 X-Source: \r
48 X-Source-Args: \r
49 X-Source-Dir: \r
50 X-BeenThere: notmuch@notmuchmail.org\r
51 X-Mailman-Version: 2.1.13\r
52 Precedence: list\r
53 List-Id: "Use and development of the notmuch mail system."\r
54         <notmuch.notmuchmail.org>\r
55 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
56         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
57 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
58 List-Post: <mailto:notmuch@notmuchmail.org>\r
59 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
60 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
61         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
62 X-List-Received-Date: Fri, 16 Jan 2015 00:31:07 -0000\r
63 \r
64 ---\r
65  lib/database-private.h | 15 ++++++++++++---\r
66  lib/database.cc        | 10 ++++++++--\r
67  2 files changed, 20 insertions(+), 5 deletions(-)\r
68 \r
69 diff --git a/lib/database-private.h b/lib/database-private.h\r
70 index 15e03cc..6d6fa2c 100644\r
71 --- a/lib/database-private.h\r
72 +++ b/lib/database-private.h\r
73 @@ -92,6 +92,14 @@ enum _notmuch_features {\r
74       *\r
75       * Introduced: version 3. */\r
76      NOTMUCH_FEATURE_GHOSTS = 1 << 4,\r
77 +\r
78 +\r
79 +    /* If set, then the database was created after the introduction of\r
80 +     * indexed mime types. If unset, then the database may contain a\r
81 +     * mixture of messages with indexed and non-indexed mime types.\r
82 +     *\r
83 +     * Introduced: version 3. */\r
84 +    NOTMUCH_FEATURE_INDEXED_MIMETYPES = 1 << 5,\r
85  };\r
86  \r
87  /* In C++, a named enum is its own type, so define bitwise operators\r
88 @@ -161,9 +169,10 @@ struct _notmuch_database {\r
89  \r
90  /* Current database features.  If any of these are missing from a\r
91   * database, request an upgrade.\r
92 - * NOTMUCH_FEATURE_FROM_SUBJECT_ID_VALUES is not included because\r
93 - * upgrade doesn't currently introduce the feature (though brand new\r
94 - * databases will have it). */\r
95 + * NOTMUCH_FEATURE_FROM_SUBJECT_ID_VALUES and\r
96 + * NOTMUCH_FEATURE_INDEXED_MIMETYPES are not included because upgrade\r
97 + * doesn't currently introduce the features (though brand new databases\r
98 + * will have it). */\r
99  #define NOTMUCH_FEATURES_CURRENT \\r
100      (NOTMUCH_FEATURE_FILE_TERMS | NOTMUCH_FEATURE_DIRECTORY_DOCS | \\r
101       NOTMUCH_FEATURE_BOOL_FOLDER | NOTMUCH_FEATURE_GHOSTS)\r
102 diff --git a/lib/database.cc b/lib/database.cc\r
103 index 3601f9d..0d2c417 100644\r
104 --- a/lib/database.cc\r
105 +++ b/lib/database.cc\r
106 @@ -304,6 +304,11 @@ static const struct {\r
107        "exact folder:/path: search", "rw" },\r
108      { NOTMUCH_FEATURE_GHOSTS,\r
109        "mail documents for missing messages", "w"},\r
110 +    /* Knowledge of the index mime-types are not required for reading\r
111 +     * a database because a reader will just be unable to query\r
112 +     * them. */\r
113 +    { NOTMUCH_FEATURE_INDEXED_MIMETYPES,\r
114 +      "indexed MIME types", "w"},\r
115  };\r
116  \r
117  const char *\r
118 @@ -646,9 +651,10 @@ notmuch_database_create (const char *path, notmuch_database_t **database)\r
119      if (status)\r
120         goto DONE;\r
121  \r
122 -    /* Upgrade doesn't add this feature to existing databases, but new\r
123 -     * databases have it. */\r
124 +    /* Upgrade doesn't add these feature to existing databases, but\r
125 +     * new databases have them. */\r
126      notmuch->features |= NOTMUCH_FEATURE_FROM_SUBJECT_ID_VALUES;\r
127 +    notmuch->features |= NOTMUCH_FEATURE_INDEXED_MIMETYPES;\r
128  \r
129      status = notmuch_database_upgrade (notmuch, NULL, NULL);\r
130      if (status) {\r
131 -- \r
132 1.9.1\r
133 \r