unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Mark Walters <markwalters1009@gmail.com>
To: notmuch@notmuchmail.org,
	Jameson Graef Rollins <jrollins@finestructure.net>
Subject: Re: [Patch v7 00/13] Add NOTMUCH_MESSAGE_FLAG_EXCLUDED flag
Date: Fri, 02 Mar 2012 20:31:47 +0000	[thread overview]
Message-ID: <871upawxqk.fsf@qmul.ac.uk> (raw)
In-Reply-To: <1330641045-27416-1-git-send-email-markwalters1009@gmail.com>

On Thu,  1 Mar 2012 22:30:32 +0000, Mark Walters <markwalters1009@gmail.com> wrote:
> This is essentially the same as
> id:"1330157204-26094-1-git-send-email-markwalters1009@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@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

  parent reply	other threads:[~2012-03-02 20:30 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-01 22:30 [Patch v7 00/13] Add NOTMUCH_MESSAGE_FLAG_EXCLUDED flag Mark Walters
2012-03-01 22:30 ` [Patch v7 01/13] cli: add --no-exclude option to count and search Mark Walters
2012-03-01 22:30 ` [Patch v7 02/13] cli: Add --no-exclude to the man pages for search and count Mark Walters
2012-03-01 22:30 ` [Patch v7 03/13] test: add tests for new cli --no-exclude option Mark Walters
2012-03-01 22:30 ` [Patch v7 04/13] lib: Rearrange the exclude code in query.cc Mark Walters
2012-03-01 22:30 ` [Patch v7 05/13] lib: Make notmuch_query_search_messages set the exclude flag Mark Walters
2012-03-01 22:30 ` [Patch v7 06/13] lib: Add the exclude flag to notmuch_query_search_threads Mark Walters
2012-03-01 22:30 ` [Patch v7 07/13] test: update search test to reflect exclude flag Mark Walters
2012-03-01 22:30 ` [Patch v7 08/13] cli: Make notmuch-show respect excludes Mark Walters
2012-03-01 22:30 ` [Patch v7 09/13] test: update tests to reflect the exclude flag Mark Walters
2012-03-01 22:30 ` [Patch v7 10/13] man: update manpage for notmuch-show --no-exclude option Mark Walters
2012-03-01 22:30 ` [Patch v7 11/13] cli: omit excluded messages in results where appropriate Mark Walters
2012-03-01 22:30 ` [Patch v7 12/13] emacs: show: recognize the exclude flag Mark Walters
2012-03-01 22:30 ` [Patch v7 13/13] emacs: notmuch.el ignore excluded matches Mark Walters
2012-03-02 13:03 ` [Patch v7 00/13] Add NOTMUCH_MESSAGE_FLAG_EXCLUDED flag David Bremner
2012-03-02 20:31 ` Mark Walters [this message]
2012-03-03  3:42 ` Mark Walters
2012-03-03 12:41   ` Mark Walters

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871upawxqk.fsf@qmul.ac.uk \
    --to=markwalters1009@gmail.com \
    --cc=jrollins@finestructure.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).