Re: [PATCH 4/7] lib: Add the exclude flag to notmuch_query_search_threads
authorAustin Clements <amdragon@MIT.EDU>
Tue, 31 Jan 2012 05:07:48 +0000 (00:07 +1900)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:43:46 +0000 (09:43 -0800)
76/801b6cab930bd42785e131beac810f6f416045 [new file with mode: 0644]

diff --git a/76/801b6cab930bd42785e131beac810f6f416045 b/76/801b6cab930bd42785e131beac810f6f416045
new file mode 100644 (file)
index 0000000..ef4aaf2
--- /dev/null
@@ -0,0 +1,96 @@
+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 1460A429E34\r
+       for <notmuch@notmuchmail.org>; Mon, 30 Jan 2012 21:08:43 -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 VFuo5G9fBLu2 for <notmuch@notmuchmail.org>;\r
+       Mon, 30 Jan 2012 21:08:42 -0800 (PST)\r
+Received: from dmz-mailsec-scanner-5.mit.edu (DMZ-MAILSEC-SCANNER-5.MIT.EDU\r
+       [18.7.68.34])\r
+       by olra.theworths.org (Postfix) with ESMTP id 7A2A1431E64\r
+       for <notmuch@notmuchmail.org>; Mon, 30 Jan 2012 21:08:42 -0800 (PST)\r
+X-AuditID: 12074422-b7fd66d0000008f9-78-4f27775a6f88\r
+Received: from mailhub-auth-1.mit.edu ( [18.9.21.35])\r
+       by dmz-mailsec-scanner-5.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id 12.26.02297.A57772F4; Tue, 31 Jan 2012 00:08:42 -0500 (EST)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+       by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id q0V58fHc030126; \r
+       Tue, 31 Jan 2012 00:08:42 -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 q0V58ecs004095\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Tue, 31 Jan 2012 00:08:41 -0500 (EST)\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1Rs5wa-0002pP-NX; Tue, 31 Jan 2012 00:07:48 -0500\r
+Date: Tue, 31 Jan 2012 00:07:48 -0500\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: Mark Walters <markwalters1009@gmail.com>\r
+Subject: Re: [PATCH 4/7] lib: Add the exclude flag to\r
+       notmuch_query_search_threads\r
+Message-ID: <20120131050748.GA10844@mit.edu>\r
+References: <8762fu4aqt.fsf@qmul.ac.uk>\r
+       <1327862394-14334-4-git-send-email-markwalters1009@gmail.com>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+In-Reply-To: <1327862394-14334-4-git-send-email-markwalters1009@gmail.com>\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFupjleLIzCtJLcpLzFFi42IR4hRV1o0qV/c36LrBarF6Lo/F9ZszmR2Y\r
+       PHbOusvu8WzVLeYApigum5TUnMyy1CJ9uwSujJ2rz7AXHGWrmNM5ibWBcQNrFyMnh4SAicTz\r
+       ExPYIWwxiQv31rN1MXJxCAnsY5TYdPIvE4SzgVHi0sbZzBDOSSaJWWcWsEA4Sxgl1vdtAetn\r
+       EVCV+PntMhOIzSagIbFt/3JGEFtEQEfi9qEFYDXMAtIS3343g9UIC4RIPP64D+gODg5eoJrN\r
+       q4tAwkIC6RKbn79lAbF5BQQlTs58wgLRqiVx499LJpBykDHL/3GAhDkFvCQ2XO8Fmy4qoCIx\r
+       5eQ2tgmMQrOQdM9C0j0LoXsBI/MqRtmU3Crd3MTMnOLUZN3i5MS8vNQiXVO93MwSvdSU0k2M\r
+       oKBmd1HawfjzoNIhRgEORiUe3j3v1fyFWBPLiitzDzFKcjApifLOKVD3F+JLyk+pzEgszogv\r
+       Ks1JLT7EKMHBrCTC+2Y1UDlvSmJlVWpRPkxKmoNFSZxXXeudH9C/iSWp2ampBalFMFkZDg4l\r
+       Cd4jZUBDBYtS01Mr0jJzShDSTBycIMN5gIZvA6nhLS5IzC3OTIfIn2LU5Wh/u/s8oxBLXn5e\r
+       qpQ4bzxIkQBIUUZpHtwcWDJ6xSgO9JYw7wWQKh5gIoOb9ApoCRPQkucMqiBLShIRUlINjCaC\r
+       W/PL/Xb+Z8lzUv/memLa6T33Pq1yeLDPK0ti5THHXbKKE3cfvjDD8+n2E197typM9d36KuuW\r
+       WOibGRuNF02VKZibnhS77nH3s5h38WoaXieTFeVYptv8M/6Rll52oko5W+nd7Z3J/LuaLtse\r
+       cpX4nnLOwfpiZ5mr1OK0+DCrIrW5b+qKC5RYijMSDbWYi4oTAaXO9RkhAwAA\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 05:08:43 -0000\r
+\r
+Quoth Mark Walters on Jan 29 at  6:39 pm:\r
+> Add the NOTMUCH_MESSAGE_FLAG_EXCLUDED flag to\r
+> notmuch_query_search_threads. Implemented by inspecting the tags\r
+> directly in _notmuch_thread_create/_thread_add_message rather than as\r
+> a Xapian query for speed reasons.\r
+\r
+Hmm.  Won't the thread sort be influenced by excluded messages?\r
+\r
+It's not completely obvious to me if it should or shouldn't be.  If\r
+excluded messages are counted for thread sorting, it would be very\r
+natural to toggle their visibility in the search view; otherwise we\r
+probably need to perform the entire query again with exclusions\r
+disabled.\r
+\r
+If we do want to ignore excluded messages for sorting, I think\r
+notmuch_query_search_threads can simply shuffle excluded messages to\r
+the end of doc_ids (which is slightly awkward to implement, but not\r
+too bad).\r