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 764754196F0 for ; Fri, 9 Apr 2010 12:44:16 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.701 X-Spam-Level: X-Spam-Status: No, score=-0.701 tagged_above=-999 required=5 tests=[BAYES_40=-0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=unavailable 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 TacxgXK6eNY1 for ; Fri, 9 Apr 2010 12:44:13 -0700 (PDT) Received: from VA3EHSOBE001.bigfish.com (va3ehsobe001.messaging.microsoft.com [216.32.180.11]) by olra.theworths.org (Postfix) with ESMTP id 46E1A431FC1 for ; Fri, 9 Apr 2010 12:44:13 -0700 (PDT) Received: from mail20-va3-R.bigfish.com (10.7.14.242) by VA3EHSOBE001.bigfish.com (10.7.40.21) with Microsoft SMTP Server id 8.1.340.0; Fri, 9 Apr 2010 19:44:11 +0000 Received: from mail20-va3 (localhost.localdomain [127.0.0.1]) by mail20-va3-R.bigfish.com (Postfix) with ESMTP id 00ABE2A814E; Fri, 9 Apr 2010 19:44:11 +0000 (UTC) X-SpamScore: -31 X-BigFish: VPS-31(zz1803M1432P98dN179dN1521M1442Jzz1202hzzz32i467h2a8h6bh43h61h) X-Spam-TCS-SCL: 0:0 X-FB-SS: 5, Received: from mail20-va3 (localhost.localdomain [127.0.0.1]) by mail20-va3 (MessageSwitch) id 1270842249470576_17091; Fri, 9 Apr 2010 19:44:09 +0000 (UTC) Received: from VA3EHSMHS019.bigfish.com (unknown [10.7.14.253]) by mail20-va3.bigfish.com (Postfix) with ESMTP id 6FCA9C1004D; Fri, 9 Apr 2010 19:44:09 +0000 (UTC) Received: from ausb3extmailp01.amd.com (163.181.251.8) by VA3EHSMHS019.bigfish.com (10.7.99.29) with Microsoft SMTP Server (TLS) id 14.0.482.39; Fri, 9 Apr 2010 19:44:07 +0000 Received: from ausb3twp02.amd.com ([163.181.250.38]) by ausb3extmailp01.amd.com (Switch-3.2.7/Switch-3.2.7) with SMTP id o39JeuRZ023793; Fri, 9 Apr 2010 14:40:59 -0500 X-WSS-ID: 0L0MK59-02-44V-02 X-M-MSG: Received: from sausexhtp01.amd.com (sausexhtp01.amd.com [163.181.3.165]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by ausb3twp02.amd.com (Tumbleweed MailGate 3.7.2) with ESMTP id 2AAFAC86EC; Fri, 9 Apr 2010 14:43:57 -0500 (CDT) Received: from optimon.amd.com (163.181.34.104) by sausexhtp01.amd.com (163.181.3.165) with Microsoft SMTP Server (TLS) id 8.2.234.1; Fri, 9 Apr 2010 12:44:02 -0700 Received: from mhdc-ns01.amd.com (mhdc-ns01.amd.com [165.204.35.147]) by optimon.amd.com (8.12.10/8.12.10) with ESMTP id o39Ji1nJ009763; Fri, 9 Apr 2010 14:44:01 -0500 Received: from testarossa.amd.com (testarossa.amd.com [165.204.147.44]) by mhdc-ns01.amd.com (8.13.8+Sun/8.13.8) with ESMTP id o39Jhktm026412; Fri, 9 Apr 2010 13:43:46 -0600 (MDT) Received: (from manderso@localhost) by testarossa.amd.com (8.13.1/8.13.1/Submit) id o39JhjxX027582; Fri, 9 Apr 2010 13:43:45 -0600 X-Authentication-Warning: testarossa.amd.com: manderso set sender to MarkR.Anderson@amd.com using -f From: Mark Anderson To: Carl Worth , "notmuch\@notmuchmail.org" Subject: Re: Initial attempt at a "merge window" for notmuch In-Reply-To: <87fx34twrj.fsf@yoom.home.cworth.org> References: <87hbnktx1c.fsf@yoom.home.cworth.org> <87fx34twrj.fsf@yoom.home.cworth.org> Date: Fri, 9 Apr 2010 13:43:45 -0600 Message-ID: <3wdpr282yz2.fsf@testarossa.amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Virus-Scanned: ClamAV version 0.87.1, clamav-milter version 0.87 on optimon.amd.com X-Virus-Status: Clean X-Reverse-DNS: unknown 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: Fri, 09 Apr 2010 19:44:16 -0000 On Fri, 9 Apr 2010 11:29:20 -0500, Carl Worth wrote: > On Fri, 09 Apr 2010 09:23:27 -0700, Carl Worth wrote: > > For my merge window, I also want something that can't be obtained > > today. I want to see all threads that contain at least one message > > that matches my date range and at least one message that doesn't > > have the "merged" or "postponed" tag. > ... > > I'm not sure how to best provide the ability to express the result > > I want here. > > Of course, it's the same set-theoretic operation I described earlier. I > want the set of threads having messages matching: > > tag:notmuch and > > intersected with the set of threads having messages matching: > > tag:notmuch and not ("merged" or "postponed") > > So I've got uses cases for set-difference and intersection already. Now > we just need some search syntax to express that. > Can we just start grouping with a set:( ) or { } on the command line? I'm guessing the parentheses are slightly easier. set:( tag:notmuch and ) isect set:( tag:notmuch and not (tag:merged or tag:postponed) ) Isn't that close to what you're asking for? It seems easy enough, and making the set:( explicit keeps you from inventing a new quoting syntax if you tried to say set:"tag:notmuch and " then users get to play shell-quote-mambo to actually use this outside of a client if they want (or think they want) quotes used in their search. You can reuse the "and" and "or" term for set math, unless you are averse to overloading, then isect, union are explicit enough about the terms that you could infer the "set:" term for searches: tag:notmuch and isect not ( tag:postponed or tag:merged ) But at the cost of introducing a new order of ops hierarchy. I'm not sure if you want to go there either. Just thinking about completeness, I wonder if there are some searches for threads that aren't currently available. You could introduce a search modifier that would allow you to treat a tag on a message in a thread as a tag on the entire thread, so that if you have tag:mute on on message and tag:merged on another message in the same thread, currently that does match: tag:merged and not tag:mute But maybe you wanted only the THREADS instead of THREAD CONTAINS searching. I guess we're hampered by the fact that a thread object isn't a separate object from the messages which comprise it's conversation, so we can't look at the tags on a thread separately from the tags on messages in the thread. And maybe we don't want to. Actually, this is where we differ slightly from gmail. They have tags on threads, and unread tags on messages. I don't know that there's value in distinguishing between tags on a thread and tags on a message in a thread when there isn't an object in the mailstore that actually corresponds to a thread. Hmmm, this isn't clear enough, so I'll just stop the rambling, but let it stand. -Mark P.S. Sometimes I write a long note and don't get to the last sentence for an hour or two. I can be funny that way.