]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch-search.c
Handle errors in mime_node_open
[notmuch] / notmuch-search.c
index 4baab5612efefafdacab08fe8a74eb72e8352cda..92ce38a1a5fb37454237c09313e099aa6f8f9b52 100644 (file)
@@ -90,6 +90,9 @@ format_thread_json (const void *ctx,
                    const int total,
                    const char *authors,
                    const char *subject);
+
+/* Any changes to the JSON format should be reflected in the file
+ * devel/schemata. */
 static const search_format_t format_json = {
     "[",
        "{",
@@ -423,6 +426,9 @@ notmuch_search_command (void *ctx, int argc, char *argv[])
     output_t output = OUTPUT_SUMMARY;
     int offset = 0;
     int limit = -1; /* unlimited */
+    const char **search_exclude_tags;
+    size_t search_exclude_tags_length;
+    unsigned int i;
 
     enum { NOTMUCH_FORMAT_JSON, NOTMUCH_FORMAT_TEXT }
        format_sel = NOTMUCH_FORMAT_TEXT;
@@ -490,6 +496,11 @@ notmuch_search_command (void *ctx, int argc, char *argv[])
 
     notmuch_query_set_sort (query, sort);
 
+    search_exclude_tags = notmuch_config_get_search_exclude_tags
+       (config, &search_exclude_tags_length);
+    for (i = 0; i < search_exclude_tags_length; i++)
+       notmuch_query_add_tag_exclude (query, search_exclude_tags[i]);
+
     switch (output) {
     default:
     case OUTPUT_SUMMARY: