From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id o5KlNp1C7GExVwEAgWs5BA (envelope-from ) for ; Sat, 22 Jan 2022 18:45:01 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 2MiPLp1C7GEDBAEAG6o9tA (envelope-from ) for ; Sat, 22 Jan 2022 18:45:01 +0100 Received: from mail.notmuchmail.org (yantan.tethera.net [135.181.149.255]) (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 7ECC22C905 for ; Sat, 22 Jan 2022 18:45:01 +0100 (CET) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 0BBBF5F719; Sat, 22 Jan 2022 17:44:52 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id 02A7B5F712 for ; Sat, 22 Jan 2022 17:44:49 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id 3FBF45FC03; Sat, 22 Jan 2022 12:44:48 -0500 (EST) Received: (nullmailer pid 1573329 invoked by uid 1000); Sat, 22 Jan 2022 17:44:46 -0000 From: David Bremner To: David Bremner , Gregor Zattler , notmuch@notmuchmail.org Subject: [PATCH 2/2] emacs: define, use option :disable-excludes for n-h-query-counts Date: Sat, 22 Jan 2022 13:44:40 -0400 Message-Id: <20220122174440.1573257-3-david@tethera.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220122174440.1573257-1-david@tethera.net> References: <878rv74wto.fsf@tethera.net> <20220122174440.1573257-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: 7J4PXU7CAFO3WAAW6CU5OOYF3SLWZIR5 X-Message-ID-Hash: 7J4PXU7CAFO3WAAW6CU5OOYF3SLWZIR5 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=1642873501; 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=H9yMsnfFs6nD15two2ZwPLsEOhIub2kooLG5luM2PEE=; b=rxmrkauyjBgJCz/i/6lZOfd9+vrQvk8nmwCA2q0Ewqkj6HKV9KMuHat13Ik8p1icaZvbJH rXq5oM7DmlozF3kU7PWSxSF/CyRTcULzrrnNhwsjdbj6sli8KxQO/ZTmhMsQqeIBJt5NOl hJiMQRSSXh8wwQFAFjIIPaKQ/XhFShQyEqtIg1zh30bBP6qlhOu8/W7Cp5cp5vQdhUprX9 gtkr2POYYF0encqQjaX4nSKnonSEQLfFKnoD3VNOiyOXdl4kDcCBmxQZ1AUzWu0AGzQeAh khHXOA5e1GQFHaCEqIIFu5PovNyMDTpLbFJyhfRlPKoVdCNzwbEftrxy2ikDcA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1642873501; a=rsa-sha256; cv=none; b=hIjhcttzBdoNZEQYqsb3S0552GgfgEknmwSGE49xW77K3Dv4+FfVYhocXbD1UKgk7xCXuM il+FbkSXTuzzeshXGvm/2hmuXRwlbklgUerCqqS2pcO88kBLnwTWv5RmDSmY4c1pm3lQdL LKeRjiVdfuiJljU2ZwwVsc9s76EwhOMpruCagoh3GpMa6gfuIZVh8waFtVbdJLfWu1arUG g3vuGEo8QXS+ByuO7GUhxQep9ZhhgxIQzidGykp1OUmvMXJhGPn+BU2LBvjLjKaRnB0nwr uB2FZ4bDSWssq/yv+B0bglWrGQFk/z6bdaeJzRWLa4LdCGVDyy8wzLrJ3DDNcw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -1.35 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 7ECC22C905 X-Spam-Score: -1.35 X-Migadu-Scanner: scn1.migadu.com X-TUID: 4eU4rtrBghbW Initially only use in notmuch-hello-insert-alltags. This is a more narrow resolution of [1], which (unlike [2]) does not disable exclude processing for regular saved searches. [1]: id:87wox1vovj.fsf@len.workgroup [2]: id:20220105010606.2034601-2-david@tethera.net --- emacs/notmuch-hello.el | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index 71e91093..581e7f3a 100644 --- a/emacs/notmuch-hello.el +++ b/emacs/notmuch-hello.el @@ -557,7 +557,8 @@ with any properties in the original saved-search. The values :show-empty-searches, :filter and :filter-count from options will be handled as specified for -`notmuch-hello-insert-searches'." +`notmuch-hello-insert-searches'. :disable-includes can be used to +turn off the default exclude processing in `notmuch-count(1)'" (with-temp-buffer (dolist (elem query-list nil) (let ((count-query (or (notmuch-saved-search-get elem :count-query) @@ -570,7 +571,11 @@ 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" + (if (plist-get options :disable-excludes) + "--exclude=false" + "--exclude=true") + "--batch") 0) (notmuch-logged-error "notmuch count --batch failed" "Please check that the notmuch CLI is new enough to support `count @@ -917,7 +922,8 @@ following: nil :initially-hidden (not notmuch-show-all-tags-list) :hide-tags notmuch-hello-hide-tags - :filter notmuch-hello-tag-list-make-query)) + :filter notmuch-hello-tag-list-make-query + :disable-excludes t)) (defun notmuch-hello-insert-footer () "Insert the notmuch-hello footer." -- 2.34.1