]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch-dump.c
emacs: remove unused variable in `notmuch-show-insert-part-message/rfc822'
[notmuch] / notmuch-dump.c
index 126593d177d50f5b84f0d84636ae015853fe7298..a490917f9fa59d5a9a042d0c85030bc7aad42c8e 100644 (file)
@@ -67,13 +67,16 @@ notmuch_dump_command (unused (void *ctx), int argc, char *argv[])
            return 1;
        }
     }
+
     query = notmuch_query_create (notmuch, query_str);
     if (query == NULL) {
        fprintf (stderr, "Out of memory\n");
        return 1;
     }
-    notmuch_query_set_sort (query, NOTMUCH_SORT_MESSAGE_ID);
+    /* Don't ask xapian to sort by Message-ID. Xapian optimizes returning the
+     * first results quickly at the expense of total time.
+     */
+    notmuch_query_set_sort (query, NOTMUCH_SORT_UNSORTED);
 
     for (messages = notmuch_query_search_messages (query);
         notmuch_messages_valid (messages);