Re: [Patch v7 00/13] Add NOTMUCH_MESSAGE_FLAG_EXCLUDED flag
authorMark Walters <markwalters1009@gmail.com>
Sat, 3 Mar 2012 03:42:44 +0000 (03:42 +0000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:45:11 +0000 (09:45 -0800)
2c/1452fa53c632b8a4299fb21c8bc7f15eabf36e [new file with mode: 0644]

diff --git a/2c/1452fa53c632b8a4299fb21c8bc7f15eabf36e b/2c/1452fa53c632b8a4299fb21c8bc7f15eabf36e
new file mode 100644 (file)
index 0000000..fb92fb8
--- /dev/null
@@ -0,0 +1,150 @@
+Return-Path: <m.walters@qmul.ac.uk>\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 C027C431FAF\r
+       for <notmuch@notmuchmail.org>; Fri,  2 Mar 2012 19:41:01 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 1.401\r
+X-Spam-Level: *\r
+X-Spam-Status: No, score=1.401 tagged_above=-999 required=5\r
+       tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001,\r
+       FREEMAIL_REPLY=2.499, NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3]\r
+       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 0t-YTJQLf8-G for <notmuch@notmuchmail.org>;\r
+       Fri,  2 Mar 2012 19:40:59 -0800 (PST)\r
+Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6])\r
+       (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id A90CD431FAE\r
+       for <notmuch@notmuchmail.org>; Fri,  2 Mar 2012 19:40:59 -0800 (PST)\r
+Received: from smtp.qmul.ac.uk ([138.37.6.40])\r
+       by mail2.qmul.ac.uk with esmtp (Exim 4.71)\r
+       (envelope-from <m.walters@qmul.ac.uk>)\r
+       id 1S3fq3-0003qx-RI; Sat, 03 Mar 2012 03:40:56 +0000\r
+Received: from 94-192-233-223.zone6.bethere.co.uk ([94.192.233.223]\r
+       helo=localhost)\r
+       by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69)\r
+       (envelope-from <m.walters@qmul.ac.uk>)\r
+       id 1S3fq3-0004gc-GU; Sat, 03 Mar 2012 03:40:55 +0000\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: Re: [Patch v7 00/13] Add NOTMUCH_MESSAGE_FLAG_EXCLUDED flag\r
+In-Reply-To: <1330641045-27416-1-git-send-email-markwalters1009@gmail.com>\r
+References: <1330641045-27416-1-git-send-email-markwalters1009@gmail.com>\r
+User-Agent: Notmuch/0.11.1+277~gb0f05ff (http://notmuchmail.org) Emacs/23.2.1\r
+       (i486-pc-linux-gnu)\r
+Date: Sat, 03 Mar 2012 03:42:44 +0000\r
+Message-ID: <87y5riuz7v.fsf@qmul.ac.uk>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-Sender-Host-Address: 94.192.233.223\r
+X-QM-SPAM-Info: Sender has good ham record.  :)\r
+X-QM-Body-MD5: 7417e2e565252e3ecd8112db2c0496fd (of first 20000 bytes)\r
+X-SpamAssassin-Score: -1.2\r
+X-SpamAssassin-SpamBar: -\r
+X-SpamAssassin-Report: The QM spam filters have analysed this message to\r
+       determine if it is\r
+       spam. We require at least 5.0 points to mark a message as spam.\r
+       This message scored -1.2 points.\r
+       Summary of the scoring: \r
+       * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/,\r
+       *      medium trust\r
+       *      [138.37.6.40 listed in list.dnswl.org]\r
+       * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\r
+       provider *      (markwalters1009[at]gmail.com)\r
+       * -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay\r
+       *      domain\r
+       *  1.0 FREEMAIL_REPLY From and body contain different freemails\r
+       *  0.1 AWL AWL: From: address is in the auto white-list\r
+X-QM-Scan-Virus: ClamAV says the message is clean\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: Sat, 03 Mar 2012 03:41:01 -0000\r
+\r
+On Thu,  1 Mar 2012 22:30:32 +0000, Mark Walters <markwalters1009@gmail.com> wrote:\r
+> This is essentially the same as\r
+> id:"1330157204-26094-1-git-send-email-markwalters1009@gmail.com" but\r
+> has been rebased against master. The changes are to patch 12/13 for\r
+> notmuch-show.el (which was posted as a followup to the previous series)\r
+> and to the tests (patch 9/13) which changed in Austin's JSON show\r
+> rewrite.\r
+\r
+There are some problems with this series which were discussed on irc\r
+today. In particular the cli notmuch search output is too cluttered for\r
+human readability (with lots of excluded threads showing [0/n]) and in\r
+some cases it is too slow (it is the same speed as if there were no\r
+excludes but looks slower as it outputs less). The following is a\r
+proposal to address this.\r
+\r
+PROPOSAL\r
+\r
+lib: Change the notmuch_query_set_omit_excluded_messages to a\r
+notmuch_query_set_with_excluded_messages option (essentially the\r
+negation) This just affects the `seeding' of the thread search: whole\r
+threads are returned regardless but unless this is set only threads that\r
+match in a non-excluded message are returned. In either case excluded\r
+messages have the exclude flag set.\r
+\r
+cli: replace the --no-excludes option with a --with-excluded option\r
+which is roughly the *same*: it outputs the excluded messages (but marks\r
+them excluded in so far as the output allows it). I deal with each of\r
+count/search and show in turn.\r
+\r
+count: apply excludes unless --with-excluded. This includes the excluded\r
+messages/threads in the count. This could be done with the lib call\r
+above but it is easier not to set the excludes in the first place.\r
+\r
+search: for output=threads|messages|tags we either set or not the\r
+exclude terms depending on the --with-excluded option. \r
+\r
+For output=summary (default) we normally return just those threads which\r
+match in a non-excluded message. With the --with-excluded option return\r
+all threads that match (using the with_excluded lib call). In both cases\r
+the count is [x/y] where x is the number of matching non-excluded\r
+messages and y is the total number of messages.  It will not be possible\r
+to get the pre-exclude output; with the --with-excluded option you get\r
+the same threads but the count (x in the above) will show matched and\r
+non-excluded instead of matched.\r
+\r
+show: raw/part are irrelevant as they do not (and should not) apply\r
+excludes. \r
+\r
+When given --with-excluded it returns all messages (in all threads if\r
+given --entire-thread) and marks excluded if possible (i.e., unless\r
+format=mbox).\r
+\r
+The remaining cases are all when --with-excluded is not passed. We can\r
+have format=json/text/mbox and entire-thread or not. We do not pass\r
+with_excluded to the lib so we only get threads matching in a\r
+non-excluded message. The question is which of the messages in these\r
+threads to output. Note emacs will not care as it will pass in the\r
+--with-excluded option.\r
+\r
+Perhaps --entire-thread should return the whole thread including\r
+excluded messages but without --entire-thread just return the\r
+matching-non-excluded messages. We have flexibility here as show did not\r
+do anything with exclude_tags until this series so not even git users\r
+will have got used to any particular behaviour.\r
+\r
+Does this seem reasonable? The only potential problem I can see is\r
+someone wanting exactly the pre-exclude search output. Oh and someone\r
+might suggest a better name than --with-excluded: --include-excluded\r
+seemed worse!\r
+\r
+Best wishes\r
+\r
+Mark\r