Re: [PATCH 9/9] add has: query prefix to search for specific properties
[notmuch-archives.git] / 99 / e625582e2ed24e7bb546bd0e69967b7e1b263e
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 1A37C429E32\r
6         for <notmuch@notmuchmail.org>; Sun, 23 Feb 2014 08:55:39 -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.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 NRCDxlebVxTe for <notmuch@notmuchmail.org>;\r
16         Sun, 23 Feb 2014 08:55:33 -0800 (PST)\r
17 Received: from mail-ee0-f42.google.com (mail-ee0-f42.google.com\r
18  [74.125.83.42])        (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
19  certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
20  53412431FD8    for <notmuch@notmuchmail.org>; Sun, 23 Feb 2014 08:55:31 -0800\r
21  (PST)\r
22 Received: by mail-ee0-f42.google.com with SMTP id e53so1085795eek.29\r
23         for <notmuch@notmuchmail.org>; Sun, 23 Feb 2014 08:55:27 -0800 (PST)\r
24 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
25         d=1e100.net; s=20130820;\r
26         h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\r
27         :references;\r
28         bh=j4xJ+TiJeAuK1GA4z2ixk2nLz8qpGNwCBGGck+/yhwU=;\r
29         b=AC9AtFG/87cNBavpZPuJ9IqJq1jgx/3Kr8AMToBonvL0/XeJWdh2onf4uFRmw0eBx3\r
30         fMv8VhkwrGO1cv+yylFBW4jkHqERCnwGqoCtX3XF01Dt9CreP5lU6qn8PeznZxMfUPvn\r
31         QWdElRhfWzJq57swnieoiGRqEXhPQieTVRX45O4gnlxrihKL78OeensQUjmHf2rMuGge\r
32         jcuAvgA17653+WvGsEMw/erGkGVgbEgb2ddfnjjhkNu5lP2ver64Dobos0kKe+r/nGa/\r
33         rUenpstYrGBHVjqMeJdEFr/UuWWfb1zK9TPKNwJeD9nn7fImfR9CvUjKwTIlfKgY6rFj\r
34         nJEw==\r
35 X-Gm-Message-State:\r
36  ALoCoQkl4zZkIVpc9XJsg1LoFUcU6FpGaBhxlQIcE80ObGEjdaySQsh85sKxgNQOmxVe82XF/NTa\r
37 X-Received: by 10.15.48.1 with SMTP id g1mr19451364eew.51.1393174527246;\r
38         Sun, 23 Feb 2014 08:55:27 -0800 (PST)\r
39 Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi.\r
40         [88.195.111.91])\r
41         by mx.google.com with ESMTPSA id m1sm53062062een.7.2014.02.23.08.55.25\r
42         for <multiple recipients>\r
43         (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
44         Sun, 23 Feb 2014 08:55:26 -0800 (PST)\r
45 From: Jani Nikula <jani@nikula.org>\r
46 To: notmuch@notmuchmail.org,\r
47         Rob Browning <rlb@defaultvalue.org>\r
48 Subject: [PATCH 0/3] check new.tags for invalid tags\r
49 Date: Sun, 23 Feb 2014 18:55:20 +0200\r
50 Message-Id: <cover.1393174108.git.jani@nikula.org>\r
51 X-Mailer: git-send-email 1.8.5.3\r
52 In-Reply-To: <87ha7qfto7.fsf@trouble.defaultvalue.org>\r
53 References: <87ha7qfto7.fsf@trouble.defaultvalue.org>\r
54 X-BeenThere: notmuch@notmuchmail.org\r
55 X-Mailman-Version: 2.1.13\r
56 Precedence: list\r
57 List-Id: "Use and development of the notmuch mail system."\r
58         <notmuch.notmuchmail.org>\r
59 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
60         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
61 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
62 List-Post: <mailto:notmuch@notmuchmail.org>\r
63 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
64 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
65         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
66 X-List-Received-Date: Sun, 23 Feb 2014 16:55:39 -0000\r
67 \r
68 On Sun, 23 Feb 2014, Rob Browning <rlb@defaultvalue.org> wrote:\r
69 > In the [new] section, "tags=;" will cause notmuch to create empty tags\r
70 > that are fairly hard to remove from the command line.\r
71 \r
72 Clearly broken. This series fixes the issue at the cli\r
73 level. (Forbidding empty tags at the lib level is slightly more\r
74 complicated, as we would still have to ensure old dump files can be\r
75 restored.)\r
76 \r
77 > After some help on #bup, here's what I came up with to remove them,\r
78 > though it assumes that the empty tag "+ " will always be first in dump's\r
79 > output:\r
80 >\r
81 >   notmuch dump --format=batch-tag 'tag:""' | perl -pe 's/^\+ //' \\r
82 >     | notmuch restore --format=batch-tag\r
83 >\r
84 > And note that you have to use restore, "notmuch tag --batch" doesn't\r
85 > appear to accept "- " as a tag, even though dump will produce "+ ".\r
86 \r
87 I didn't check this further, but the regular, non-batch notmuch tag\r
88 should still work for removal of empty tags.\r
89 \r
90 BR,\r
91 Jani.\r
92 \r
93 Jani Nikula (3):\r
94   cli: export function for illegal tag checking\r
95   cli: make sure notmuch new and insert don't add invalid tags\r
96   test: add tests for invalid new.tags\r
97 \r
98  notmuch-insert.c    |  9 +++++++++\r
99  notmuch-new.c       | 14 +++++++++++++-\r
100  tag-util.c          |  9 +--------\r
101  tag-util.h          | 12 ++++++++++++\r
102  test/T050-new.sh    | 17 +++++++++++++++++\r
103  test/T070-insert.sh | 19 +++++++++++++++++++\r
104  6 files changed, 71 insertions(+), 9 deletions(-)\r
105 \r
106 -- \r
107 1.8.5.3\r
108 \r