From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id yD8QOAhc6mMcdgEAbAwnHQ (envelope-from ) for ; Mon, 13 Feb 2023 16:49:28 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id AJS7Nwhc6mPoCQAAauVa8A (envelope-from ) for ; Mon, 13 Feb 2023 16:49:28 +0100 Received: from mail.notmuchmail.org (yantan.tethera.net [IPv6:2a01:4f9:c011:7a79::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 7DB5121A3B for ; Mon, 13 Feb 2023 16:49:28 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20210112 header.b=DW4J3S+N; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1676303368; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=z8pumZT7q97wLcHbMZgrw4flzINodrjHKtrF8ELxrHw=; b=NHcf+6pvq160oBSS21HAJKCzbUSeJdoOuVsCFa7PeLhYaCLk3rSyzoPE/JDA5z4VjkUVdA 0fCvPvxZqpYLvJdywxnaqNSWfndQ3/cHM2wKtoPKY1VL7XUm0Kfj9+N1HlZ4qHywFS0qJY jBDKK3bMnwf+aSbC06XzWgsMj3hPBfdr0TcSv3GjGuwCWzSglYaU+jy/8Ui71soz565+Sg JlFmB2DdYtNhRb+HeAH6J3jWdrABSDfinXbujrPq6IDZlhoM9yYoFmTqWyDiEkE32P55XQ Bj8nRZJFyqA0HATMFZoLk8rT+RZWwVCLHIY77uuxLCrI5JgqLavlGepiyYTBDQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20210112 header.b=DW4J3S+N; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1676303368; a=rsa-sha256; cv=none; b=reHIEjy5kh+Ik6z6lU8Ky24dd7vXckCPEqORAdiIk56PCTwXfM46jpdS9Ez+858NNwySyz 6P+DFKx7EiYBX7vzlBKfTXeOVNyIwMUIeVSXvMy+09L7r/7QkS0mQpwJXFQ4shIOhLMPV+ rr79ta+s2lAzDFBV7GKzx+JpffNA27A3wIaly6cQOt/MmlUifwb3PdrtmDe5pp0FdCmhdj VbNUgvqXOwZO7GMZ7bIKhuZW6MmMdXTyBKwEk1VkIOQJiVDwSVXU1f2/5AQsSVyuIVbyWX Qw9j6TQ41JvPyOl6vOv0EiDA98125mfVlm5ackjCqaHTCBIQezadoUGtw/uK3Q== Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id CC0655F3CF; Mon, 13 Feb 2023 15:39:55 +0000 (UTC) Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by mail.notmuchmail.org (Postfix) with ESMTPS id 4B41F5F35B for ; Mon, 13 Feb 2023 15:39:54 +0000 (UTC) Received: by mail-ed1-x534.google.com with SMTP id fi26so13454971edb.7 for ; Mon, 13 Feb 2023 07:39:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=CJX6q9EV6M6/EjkAu5t/FZPw809y7mBlxVM6zeIluJ4=; b=DW4J3S+N5wkS/Rg/HSfT7IBFt52giQQujngahmSzstwEkfKNgmdqqKtDX7YVQDtoPW VIdMT8jXDi/8tUEsCgaHSkE7lkUCjr32PEIv3BtvXyVBSlImgRZg2KAo/FiihMmy2+O7 aqHWEmzISm3G0AiUaN5KgIr/MntkaC1a7o3cqzjhhrO0IXl8/ztEgHtjWG5ioB9eqXlL NmCo4PCfjLoMmFRMEpCBO9jYIMN8NkyVxBXhSBRseL5EzXhMBhUKEfo4LS3lG7qCyafT iA2Binvne7A2CjGsl+58owrJrIJyHApQYxsAe3MukzGFrZIQNrFE3jg7BpZSGnbnJmWb pMvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=CJX6q9EV6M6/EjkAu5t/FZPw809y7mBlxVM6zeIluJ4=; b=FNdEHLQLZOSHcr/4t0hEDleBTZfzzwSZ8gwHknIbon9vCTObifeXR8fKygYJNbrhaD YdfeJHq1gMgBUIyRiILAlYNhTP9glAwUW7OVoDYg7QUXOZ6t+skpfN3/SQnOpekATb4U gDM7bA265ft3w5UFC0b9wO0yfK/unbs1B/XV/n5IbKxnj9hU0K9YyshHdIcZ6hapgcj3 ulQ2LtfbTVMN73ZIPga+fr5y9c+GTWw1GC0VTDT0ksvd7LcRlsN3Lej3QJLj8bnWpd3X ZuALaSPeTxgirjYX83yMSY3lLOINtu9Oq4ska1eoer2oW32vu1TDqh/CvmLIhgfUL0gA KeFA== X-Gm-Message-State: AO0yUKVxyze+bkYfcIFOaBBj9c4Spo/g3AxIbUns0roNPUOrvK5SWe1N o4G65BJ9/gF5ABPzxvsX5/MOhfYjjE0qZFuRvc8= X-Google-Smtp-Source: AK7set/OTlpXV1LPia7SQZZpgIzXkhhLegG1MGBurr7NSSJMQn65EsKEePUIK7Xrv4pkZozMxu3v1NEGwqFp1T3x/Kk= X-Received: by 2002:a50:cd8e:0:b0:49d:ec5e:1e9a with SMTP id p14-20020a50cd8e000000b0049dec5e1e9amr7221847edi.7.1676302793573; Mon, 13 Feb 2023 07:39:53 -0800 (PST) MIME-Version: 1.0 References: <20230213122631.2088558-1-david@tethera.net> In-Reply-To: <20230213122631.2088558-1-david@tethera.net> From: Michael J Gruber Date: Mon, 13 Feb 2023 16:39:42 +0100 Message-ID: Subject: Re: Proof of concept for counting messages in thread To: David Bremner , notmuch@notmuchmail.org Message-ID-Hash: TH5RMN64GSJLBZ4Q4YXLTHBFFPHT4ELL X-Message-ID-Hash: TH5RMN64GSJLBZ4Q4YXLTHBFFPHT4ELL X-MailFrom: michaeljgruber@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: pabs@debian.org X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: X-Migadu-Queue-Id: 7DB5121A3B X-Spam-Score: 7.19 X-Migadu-Spam-Score: 7.19 X-Migadu-Scanner: scn0.migadu.com List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Country: DE X-Migadu-Flow: FLOW_IN X-TUID: PTE3De8UhTxj Am Mo., 13. Feb. 2023 um 13:26 Uhr schrieb David Bremner : > > So for this only supports counting messages in threads, and the sexp > based query parser. It seems useful to expand it to other fields > (from, e.g.). I'm not sure how motivated I am to shim this into the > infix query parser, but we will see how it goes. This certainly looks interesting, and not easy to get by scripting around the existing commands. It is kinda special, so having it in sexp only seems okay. I am getting a few surprising matches, e.g. ``` notmuch search --query=sexp '(thread (count 115)))' thread:0000000000021229 2021-05-17 [5/5] Michael J Gruber ... redacted notmuch count --exclude=false thread:0000000000021229 5 ``` It could be some database issues, of course. Or me misunderstanding something :) Patch 1/2 is crlf garbled, by the way. Applies cleanly after removing the extra ^Ms. Michael