Re: [PATCH 3/7] lib: Make notmuch_query_search_messages set the exclude flag
authorAustin Clements <amdragon@MIT.EDU>
Tue, 31 Jan 2012 16:25:06 +0000 (11:25 +1900)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:43:50 +0000 (09:43 -0800)
2e/2fb7725da36de7a9bc05f1b5ed744204ffda3b [new file with mode: 0644]

diff --git a/2e/2fb7725da36de7a9bc05f1b5ed744204ffda3b b/2e/2fb7725da36de7a9bc05f1b5ed744204ffda3b
new file mode 100644 (file)
index 0000000..d3e9d96
--- /dev/null
@@ -0,0 +1,116 @@
+Return-Path: <amdragon@mit.edu>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 546C4429E5B\r
+       for <notmuch@notmuchmail.org>; Tue, 31 Jan 2012 08:26:04 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id x4Um6ujzGT8w for <notmuch@notmuchmail.org>;\r
+       Tue, 31 Jan 2012 08:26:03 -0800 (PST)\r
+Received: from dmz-mailsec-scanner-6.mit.edu (DMZ-MAILSEC-SCANNER-6.MIT.EDU\r
+       [18.7.68.35])\r
+       by olra.theworths.org (Postfix) with ESMTP id 94F5A429E25\r
+       for <notmuch@notmuchmail.org>; Tue, 31 Jan 2012 08:26:03 -0800 (PST)\r
+X-AuditID: 12074423-b7f9c6d0000008c3-d8-4f28161bc839\r
+Received: from mailhub-auth-3.mit.edu ( [18.9.21.43])\r
+       by dmz-mailsec-scanner-6.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id 37.9C.02243.B16182F4; Tue, 31 Jan 2012 11:26:03 -0500 (EST)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+       by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id q0VGQ2pK029324; \r
+       Tue, 31 Jan 2012 11:26:02 -0500\r
+Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
+       (authenticated bits=0)\r
+       (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q0VGQ0oU028485\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Tue, 31 Jan 2012 11:26:02 -0500 (EST)\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1RsGW2-0004CC-UT; Tue, 31 Jan 2012 11:25:06 -0500\r
+Date: Tue, 31 Jan 2012 11:25:06 -0500\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: Mark Walters <markwalters1009@gmail.com>\r
+Subject: Re: [PATCH 3/7] lib: Make notmuch_query_search_messages set the\r
+       exclude flag\r
+Message-ID: <20120131162506.GE10898@mit.edu>\r
+References: <8762fu4aqt.fsf@qmul.ac.uk>\r
+       <1327862394-14334-3-git-send-email-markwalters1009@gmail.com>\r
+       <20120131044352.GZ17991@mit.edu> <87y5soccyi.fsf@qmul.ac.uk>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+In-Reply-To: <87y5soccyi.fsf@qmul.ac.uk>\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFprAKsWRmVeSWpSXmKPExsUixCmqrSstpuFvsO0Gm8XquTwW12/OZHZg\r
+       8tg56y67x7NVt5gDmKK4bFJSczLLUov07RK4Mn69vsVacIenYnJTM0sDYyNXFyMnh4SAicTx\r
+       n53MELaYxIV769m6GLk4hAT2MUrMurmFHcLZwCjxdvEpqMxJJomPr75AOUsYJVqn/WEF6WcR\r
+       UJV4+WA2O4jNJqAhsW3/ckYQW0RAR+L2oQVgcWYBaYlvv5uZQGxhgXCJRX++s4DYvEA1ay/+\r
+       ZIUYuoJRoufYV3aIhKDEyZlPWCCatSRu/HsJ1MwBNmj5Pw6QMCfQrtWdk9hAbFEBFYkpJ7ex\r
+       TWAUmoWkexaS7lkI3QsYmVcxyqbkVunmJmbmFKcm6xYnJ+blpRbpmunlZpbopaaUbmIEBTa7\r
+       i/IOxj8HlQ4xCnAwKvHw7nyv5i/EmlhWXJl7iFGSg0lJlPe7oIa/EF9SfkplRmJxRnxRaU5q\r
+       8SFGCQ5mJRHeN6uBynlTEiurUovyYVLSHCxK4rwaWu/8hATSE0tSs1NTC1KLYLIyHBxKErwT\r
+       RYGGChalpqdWpGXmlCCkmTg4QYbzAA1fAVLDW1yQmFucmQ6RP8Woy9H+dvd5RiGWvPy8VClx\r
+       3rkgRQIgRRmleXBzYAnpFaM40FvCvCtBqniAyQxu0iugJUxAS54zqIIsKUlESEk1MCZNj+Nq\r
+       6c+a+Y3d05Y/1Eg4fU5p8zHptec3Zul1f1A3XHDFk32mhyhnXXm74C+2Ca57XXO+XjtZZRyZ\r
+       LWujdy99Q2bie9mMo3LX35a1XJ11PHodY/bDE+lVwbKaQvtNeB9If92w7Y+wwbV5YY0ep75O\r
+       Aaax+Mk7JvSrduzO5PJRkBT6mtuhxFKckWioxVxUnAgAsP8KhSMDAAA=\r
+Cc: notmuch@notmuchmail.org\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Tue, 31 Jan 2012 16:26:04 -0000\r
+\r
+Quoth Mark Walters on Jan 31 at 11:45 am:\r
+> On Mon, 30 Jan 2012 23:43:52 -0500, Austin Clements <amdragon@MIT.EDU> wrote:\r
+> > Quoth Mark Walters on Jan 29 at  6:39 pm:\r
+> > >      notmuch_message_node_t *iterator;\r
+> > >  };\r
+> > >  \r
+> > > diff --git a/lib/notmuch.h b/lib/notmuch.h\r
+> > > index 7929fe7..740d005 100644\r
+> > > --- a/lib/notmuch.h\r
+> > > +++ b/lib/notmuch.h\r
+> > > @@ -449,6 +449,11 @@ typedef enum {\r
+> > >  const char *\r
+> > >  notmuch_query_get_query_string (notmuch_query_t *query);\r
+> > >  \r
+> > > +/* specify whether to results should omit the excluded results rather\r
+> > > + * than just marking them excluded */\r
+> > > +void\r
+> > > +notmuch_query_set_omit_excluded_messages (notmuch_query_t *query, notmuch_bool_t omit);\r
+> > > +\r
+> > \r
+> > I don't think we should add this API.  The library behavior will not\r
+> > change for library users that don't use excludes and library users\r
+> > that do use excludes should by aware of the excluded flag and do the\r
+> > appropriate thing.\r
+> > \r
+> > I can see why this is handy in some cases, but I don't think it\r
+> > provides enough utility to warrant becoming part of the permanent and\r
+> > minimal library interface.\r
+> \r
+> This is really a performance improvement: suppose that there are lots of\r
+> threads that only match in excluded messages. Then without this flag we\r
+> will spend lots of time constructing the thread only for it to be\r
+> ignored. (In contrived situations this could be arbitrarily slower.)\r
+\r
+I would prefer to keep the public API minimal and only introduce\r
+something like this if people actually experience performance\r
+problems.\r