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 0BCA6431E82 for ; Wed, 15 Feb 2012 13:10:05 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -1.098 X-Spam-Level: X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5 tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] 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 Md4gxPziPDwy for ; Wed, 15 Feb 2012 13:10:01 -0800 (PST) Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id E2213431E62 for ; Wed, 15 Feb 2012 13:10:00 -0800 (PST) Received: from smtp.qmul.ac.uk ([138.37.6.40]) by mail2.qmul.ac.uk with esmtp (Exim 4.71) (envelope-from ) id 1Rxm6t-0004cF-DQ; Wed, 15 Feb 2012 21:09:59 +0000 Received: from 94-192-233-223.zone6.bethere.co.uk ([94.192.233.223] helo=localhost) by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69) (envelope-from ) id 1Rxm6t-0000h4-1K; Wed, 15 Feb 2012 21:09:55 +0000 From: Mark Walters To: Jameson Graef Rollins , notmuch@notmuchmail.org Subject: Re: [RFC PATCH v5 00/11] Add NOTMUCH_MESSAGE_FLAG_EXCLUDED flag In-Reply-To: <8739acrnu7.fsf@servo.finestructure.net> References: <1329296619-7463-1-git-send-email-markwalters1009@gmail.com> <8739acrnu7.fsf@servo.finestructure.net> User-Agent: Notmuch/0.11.1+206~g3b67774 (http://notmuchmail.org) Emacs/23.2.1 (i486-pc-linux-gnu) Date: Wed, 15 Feb 2012 21:11:15 +0000 Message-ID: <8739aber9o.fsf@qmul.ac.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Sender-Host-Address: 94.192.233.223 X-QM-SPAM-Info: Sender has good ham record. :) X-QM-Body-MD5: 34c8f45c429839e7234d8b977f37d4c6 (of first 20000 bytes) X-SpamAssassin-Score: -1.8 X-SpamAssassin-SpamBar: - X-SpamAssassin-Report: The QM spam filters have analysed this message to determine if it is spam. We require at least 5.0 points to mark a message as spam. This message scored -1.8 points. Summary of the scoring: * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, * medium trust * [138.37.6.40 listed in list.dnswl.org] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (markwalters1009[at]gmail.com) * -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * 0.5 AWL AWL: From: address is in the auto white-list X-QM-Scan-Virus: ClamAV says the message is clean 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: Wed, 15 Feb 2012 21:10:05 -0000 On Wed, 15 Feb 2012 09:46:56 -0800, Jameson Graef Rollins wrote: > On Wed, 15 Feb 2012 09:03:28 +0000, Mark Walters wrote: > > The current implementation of exclude-tags does not use excludes in > > notmuch-show.c (and thus not in notmuch-show.el). Thus when selecting > > a thread in the search view claiming one matched message you may get > > several matches in show all but one of which are tagged excluded. > > Hey, Mark. Thanks so much for working on this. This is a very nice > extension to Austin's work. > > > This set moves in a different direction. It returns all the results > > but marks excluded messages with a new flag > > (NOTMUCH_MESSAGE_FLAG_EXCLUDED) and lets the consumer decide what to > > do with them. For example it could start with the message closed in > > emacs show view, it could colour the headerline differently etc. > > I missed some of the previous discussion on this, but rather than add a > new flag, why not just use the existing "match" flag? If the message is > excluded, just mark "match" as "false". I think this is basically all > we really want. If the message is "excluded" include it in returned > threads, but just don't display it. This is in fact exactly what the > "match" flag is currently for, and I can't see any reason not to use it > here. We don't need to add anything new to the show output, and I > believe it will simplify this patch set considerably. I think the difficulty is that there are lots of annoying corner cases, but if there is a simpler solution that would be great! Anyway I will mention a couple of corner cases I can remember with any thoughts I have on alternative solutions. 1) What should notmuch show id:deleted-message-id do? It could return the thread containing the deleted message. If it does return a thread what subject does it assign it? Possibly it could return no messages and the caller would have to call it again with --no-exclude. 2) Should notmuch search return threads which match but only in excluded messages? If yes then does it sort it based on match or match-not-excluded? If the latter what happens to threads with no match-not-excluded messages? If not then does searching for id:deleted-message return no results? The caller could try with --no-exclude, but then the caller would end up returning the deleted message for search id:deleted-message but not for search id:deleted-message or id:some-other-not-deleted-message. Anyway with answers to the 2 main questions I can try thinking about simpler possibilities. Best wishes Mark