From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id GPGGEBrv1GFcdwEAgWs5BA (envelope-from ) for ; Wed, 05 Jan 2022 02:06:34 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id kAPmDRrv1GGpHQAA9RJhRA (envelope-from ) for ; Wed, 05 Jan 2022 02:06:34 +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 B1FC73E915 for ; Wed, 5 Jan 2022 02:06:33 +0100 (CET) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id B84945F714; Wed, 5 Jan 2022 01:06:21 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 032415F700 for ; Wed, 5 Jan 2022 01:06:18 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id 18D275FC50; Tue, 4 Jan 2022 20:06:16 -0500 (EST) Received: (nullmailer pid 2034619 invoked by uid 1000); Wed, 05 Jan 2022 01:06:13 -0000 From: David Bremner To: Tomi Ollila , Gregor Zattler , Notmuch Mail Subject: [PATCH 2/3] emacs: use --exclude=false when checking for empty searches Date: Tue, 4 Jan 2022 21:06:05 -0400 Message-Id: <20220105010606.2034601-2-david@tethera.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220105010606.2034601-1-david@tethera.net> References: <20220105010606.2034601-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: JEXVOVF7UPWXHD5Z5FRH6LWPWVKK7DZB X-Message-ID-Hash: JEXVOVF7UPWXHD5Z5FRH6LWPWVKK7DZB X-MailFrom: bremner@tethera.net 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 X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-Country: DE ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1641344793; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to: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; bh=LD2rV44QdRRtxXAxgykCfqkv5aXuEbxSe/rhBI3BSjQ=; b=XOq4/lLQblsuUvLVejPvIIU2jgJjkFlxTRLPZGDwd72wnZw9Eh50Y64iSCYB5BqsajF7ze MvmiP1mbb2dZbffsgn6PADC7IWvOD72rB430ZDZaZwf+a13kvvpVlL48DNT5hMsO2JiXql 3nOd2aY5vFIPKuv3UUBksEjNtEpi6SedOjoJia4ZZ4k+iuDmjRHvUJZ7iYswvgYrV66YVC tv0pCYJoJKL0fr3eSsEUtVyB0tQd2IkEwf3Hac9txrM1d2GLIho0sVwI5B4xv789NBkT9s xXB9RcfJgkLKzyImmp/UE0ndCS+pM3raFDCBsv+UYof2fubZk2ke94HKkDek/g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1641344793; a=rsa-sha256; cv=none; b=bRAdxNm5TGv9VLD5P9jBUR/miznATHcKJtBRNplcJ7ZN8RBl+rfut9YWHYz1iJIqkZOgAm 5kxnmYjQpJ9Jny/pM8AMyn0HQ/SrjfHaFXqyR/vGRTasH7lkkvqiUtZuM8rXOtwdhX9ZVy x/j5VKEbaHPIjTSyWiFQQ0bukWZy8582bAYzjHjYg/y4xDrb46O4IiEW/ybT61ZfCGprd7 nqg2aXfKbG/ejD4Vz2lDQBrS3LSC4j1sDMH6/xu9x2iRHOpjUa639gkvvRUwo6GnaNT8iW oEYCSWkfIEBWuE/wsgBG0HX+9TPoNhF3CR9lTkj6K64sEjBILFKr/XJ3lVm5aQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; 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 X-Migadu-Spam-Score: -1.24 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; 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 X-Migadu-Queue-Id: B1FC73E915 X-Spam-Score: -1.24 X-Migadu-Scanner: scn1.migadu.com X-TUID: Xk5Cv4Zc7ofy In particular tags that only occur on otherwise excluded messages do not show up in "All tags" without this change. The reported numbers _do_ take excludes into account, so it is possible that searches (e.g. the aformentioned tags) will show up with a count of zero. --- emacs/notmuch-hello.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index fc007c4c..fcf7a6aa 100644 --- a/emacs/notmuch-hello.el +++ b/emacs/notmuch-hello.el @@ -570,7 +570,7 @@ options will be handled as specified for (plist-get options :filter)))) "\n"))) (unless (= (notmuch--call-process-region (point-min) (point-max) notmuch-command - t t nil "count" "--batch") 0) + t t nil "count" "--exclude=false" "--batch") 0) (notmuch-logged-error "notmuch count --batch failed" "Please check that the notmuch CLI is new enough to support `count -- 2.34.1