[Patch v7 00/13] Add NOTMUCH_MESSAGE_FLAG_EXCLUDED flag
Mark Walters
markwalters1009 at gmail.com
Fri Mar 2 12:31:47 PST 2012
On Thu, 1 Mar 2012 22:30:32 +0000, Mark Walters <markwalters1009 at gmail.com> wrote:
> This is essentially the same as
> id:"1330157204-26094-1-git-send-email-markwalters1009 at gmail.com" but
> has been rebased against master. The changes are to patch 12/13 for
> notmuch-show.el (which was posted as a followup to the previous series)
> and to the tests (patch 9/13) which changed in Austin's JSON show
> rewrite.
This series has some significant speed issues in some use cases. It also
defaults to returning excluded messages on the command line which is
wrong.
This adds an option --include-excluded to tell search to return all
threads (excluded threads will show up as [0/n] in the match column) but
otherwise (default) omits them.
It is not clear whether there is sufficient utility to make it
worthwhile keeping this option but it should make the series usable
while that is worked out.
I will try to check old emails and work out what the uses were/corner
cases fixed by the series and post that later. It may be the case that
the show part of this series is worth keeping but not the search part.
Best wishes
Mark
--->8---
>From 64416494f4eceb9f0afbdcb973fd7a82e1e2fcf5 Mon Sep 17 00:00:00 2001
From: Mark Walters <markwalters1009 at gmail.com>
Date: Fri, 2 Mar 2012 20:19:01 +0000
Subject: [PATCH] cli: make notmuch-search.c default to omitting excluded messages
This is a temporary measure to make notmuch-search.c default to
omitting threads only matching in excluded messages entirely. This is
intended as a temporary measure while we decide whether to revert this
part of the exclude_flag series entirely.
---
notmuch-search.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/notmuch-search.c b/notmuch-search.c
index f6061e4..3d73bd5 100644
--- a/notmuch-search.c
+++ b/notmuch-search.c
@@ -436,6 +436,7 @@ notmuch_search_command (void *ctx, int argc, char *argv[])
int offset = 0;
int limit = -1; /* unlimited */
notmuch_bool_t no_exclude = FALSE;
+ notmuch_bool_t include_excluded = FALSE;
unsigned int i;
enum { NOTMUCH_FORMAT_JSON, NOTMUCH_FORMAT_TEXT }
@@ -458,6 +459,7 @@ notmuch_search_command (void *ctx, int argc, char *argv[])
{ "tags", OUTPUT_TAGS },
{ 0, 0 } } },
{ NOTMUCH_OPT_BOOLEAN, &no_exclude, "no-exclude", 'd', 0 },
+ { NOTMUCH_OPT_BOOLEAN, &include_excluded, "include-excluded", 'd', 0 },
{ NOTMUCH_OPT_INT, &offset, "offset", 'O', 0 },
{ NOTMUCH_OPT_INT, &limit, "limit", 'L', 0 },
{ 0, 0, 0, 0, 0 }
@@ -514,6 +516,8 @@ notmuch_search_command (void *ctx, int argc, char *argv[])
for (i = 0; i < search_exclude_tags_length; i++)
notmuch_query_add_tag_exclude (query, search_exclude_tags[i]);
}
+ if (!include_excluded)
+ notmuch_query_set_omit_excluded_messages (query, TRUE);
switch (output) {
default:
--
1.7.2.3
More information about the notmuch
mailing list