From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id A78C46DE2842 for ; Wed, 21 Jun 2017 13:04:57 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.34 X-Spam-Level: X-Spam-Status: No, score=-0.34 tagged_above=-999 required=5 tests=[AWL=-0.209, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wUxpnDZhrSVo for ; Wed, 21 Jun 2017 13:04:56 -0700 (PDT) Received: from mail-pg0-f42.google.com (mail-pg0-f42.google.com [74.125.83.42]) by arlo.cworth.org (Postfix) with ESMTPS id 83BAF6DE282E for ; Wed, 21 Jun 2017 13:04:56 -0700 (PDT) Received: by mail-pg0-f42.google.com with SMTP id u62so62064779pgb.3 for ; Wed, 21 Jun 2017 13:04:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:subject:in-reply-to:references:date:message-id:mime-version; bh=Iw3LyMM5sZVlPdxmS8fXc1AftFDLNWlv7FTyGvXokQI=; b=kYGXRDPBVswuVfL2Fq7DTzutvsvDoMfuTet7n6zUJLkZbZD552YxdFBHzaO5BzB5f1 z6HZNjfpnNLcHnw2o9dQy6H4eHNxL+DLhQCy5BZCILNDitNpwX6f8u+m0ui61YG0BR0+ dSFFJWg5G04dYVc+r4Lxqvci844ilZRNUAhRe8Gx2c5Xsu3ZFfn9gJ3O/QuFyddAvU8f Ao4a0jI/cWh1maliVMrMbKS0l2fpKpvFzvzCjw87UxVrUV2nbO97Sq7TSkiiOXSoC9FV Jw7Q0h+rgUxEr3/XFmB1z61e3wuSgS+M7+WgvKsCd1cnpOgqVITVy3K8IdSVEo1ewfs9 SHQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version; bh=Iw3LyMM5sZVlPdxmS8fXc1AftFDLNWlv7FTyGvXokQI=; b=D+XkrgVuXeJhJt9O9ZJ940oWpMG9Eq99nD3IB7LEyp3Hu29k/1hMkgk5VUKW4kVR8f 1yrCDF6i6zuio/uwR/7jeIlhasN6unJgWGiyRvrzoHyQx+dnakiZco0DtEVCZs0aulGX suoNWo4OlJrGZ1/zsQ2sjUd7x16zDtah5MGY8WM4XiUA+TfJktcBzkIy3DY/SJ30zmxq dmm1cnnaGW2nQpfw40Z9+C9LFng6cAViHu36G6BlzG1ZM8xb5nwEXKPcTD/oDHenMo56 zNfxKFLojr03T0ReP+1V9bzBtIvDcN4rNEAwey8rpxd65S7LFwAjVWJ3St9XbVpQtCfe qkxA== X-Gm-Message-State: AKS2vOxMu9B02orty/eLBNgY/7dZwPehlq1RygnI1bLRG+FLF0kM+jzH tXcYrJbtuXqgPm953BIHRQ== X-Received: by 10.84.215.220 with SMTP id g28mr38442596plj.281.1498075495992; Wed, 21 Jun 2017 13:04:55 -0700 (PDT) Received: from marmstrong-linux.kir.corp.google.com ([2620:0:1008:11:a1fc:59e7:d1ed:a951]) by smtp.gmail.com with ESMTPSA id q68sm38237311pfj.40.2017.06.21.13.04.54 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 21 Jun 2017 13:04:54 -0700 (PDT) From: Matt Armstrong To: Gaute Hope , David Bremner , Daniel Kahn Gillmor , notmuch@notmuchmail.org, Xu Wang Subject: Re: find threads where I and Jian participated but not Dave In-Reply-To: <1497594312.ahjx44w937.astroid@strange.none> References: <87bmprtqgo.fsf@tethera.net> <87fuf1nnl5.fsf@fifthhorseman.net> <8737b1rojw.fsf@tethera.net> <1497594312.ahjx44w937.astroid@strange.none> Date: Wed, 21 Jun 2017 13:04:53 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.23 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, 21 Jun 2017 20:04:57 -0000 Gaute Hope writes: > David Bremner writes on juni 15, 2017 22:20: >> Daniel Kahn Gillmor writes: >>> >>> One of my long-standing wishes is to be able to say "show me mails in my >>> inbox from people who have replied to messages i've sent them". >>> >>> This could be re-framed as "show me threads in which i've participated, >>> where there are some messages flagged with 'inbox'". but generating a >>> huge list of all threads in which i've participated, just to be able to >>> do an intersection operation with a (much smaller) list of all threads >>> that have a message with the inbox flag seems like a pretty gross >>> inefficiency. >> >> At the moment the best we could do is essentially the same algorithm, >> but in C instead of shell / python. Threads are not documents in the >> database, so they can't efficiently be searched for. Of course we could >> change that, but those kind of changes take a fair amount of effort, and >> some careful design work. > > There are probably multiple earlier references to this, but here's one: > > id:1471858269.x2m28lgosh.astroid@strange > > matching against the whole thread vs the individual messages would be > very useful! For what it is worth, I've found this idea from Daniel intriguing and pretty useful in practice: "show me threads in which i've participated, where there are some messages flagged with 'inbox'" I implement it like this in my post-new hook: # All messages in threads in which I participate get tag:participated notmuch search --output=threads from:marmstrong | \ sed -e 's,^,+participated -- ,' | \ notmuch tag --batch On my database the query takes about two seconds to run, and lets me to searches like "tag:inbox and tag:participated". The set of threads found is typically a subset of "tag:inbox and to:marmstrong", but not always, and I now have two canned "inbox" searches: "participated" -> "tag:inbox and tag:participated" "me" -> "tag:inbox and to:marmstrong and not tag:participated" The "me" search tends to be new stuff, bot-generated notifications, and such. The "participated" is typically active conversations and stuff I've already engaged with, or initiated myself.