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