From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id kNj6I+3rVGQMaQEASxT56A (envelope-from ) for ; Fri, 05 May 2023 13:43:41 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id KNjvI+3rVGQJEwEA9RJhRA (envelope-from ) for ; Fri, 05 May 2023 13:43:41 +0200 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 CC9303A8D8 for ; Fri, 5 May 2023 13:43:40 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 1BE9B5F524; Fri, 5 May 2023 11:43:38 +0000 (UTC) Received: from mail.kisara.moe (119.ip-51-38-65.eu [51.38.65.119]) by mail.notmuchmail.org (Postfix) with ESMTPS id 959CF5F42B for ; Fri, 5 May 2023 11:43:35 +0000 (UTC) Received: from mk-deck (unknown [146.70.133.10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by mail.kisara.moe (Postfix) with ESMTPSA id B0C27A0FB5; Fri, 5 May 2023 13:43:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kisara.moe; s=default; t=1683287014; bh=OgbowfXWJiZ7c9XawfeYWtpwE46EufBH4zdw3VDVdGU=; h=From:To:Subject:In-Reply-To:References:Date:From; b=pAhs3wdKe+l/r0XuZXXIvODH/uSRDB2PRP6FaKJ3QNFZHSrsACfsMgUmNlTn0ZOPR zUZAMzvWZLngpX3ASXCG/68+tAbcxv2cQ5RQa+/DUTo/TXMnhA2+eVLUKDBYJ5p4VN 5mKX73EQB3q4h9wjukF3JGLKo4dNkxVZ52TfCJ/Ho1cB0QIlCfpXPDkYCWyjwyHUsb LkR5aFrl6UuvR60HFdy+BBTtYMfqRlJAlqgNHdRHAXegmoolv0asW03uywNFtShAC8 1W5urXLPeK7dhD/ZRf1fdhqCSL3PP0EllOuBh4RDc6el3aOXYPQBeiFO6ayI8Cn+2m 6pid6P+KFgCWw== From: Mohsin Kaleem To: David Bremner , notmuch@notmuchmail.org Subject: Re: [PATCH v2 1/3] emacs: Add new option notmuch-search-hide-excluded In-Reply-To: <87y1m5dw49.fsf@tethera.net> References: <87v8re66mg.fsf@tethera.net> <20230416131811.658253-1-mohkale@kisara.moe> <20230416131811.658253-2-mohkale@kisara.moe> <87y1m5dw49.fsf@tethera.net> Date: Fri, 05 May 2023 12:43:34 +0100 Message-ID: <87o7mzrok9.fsf@kisara.moe> MIME-Version: 1.0 Message-ID-Hash: JRTAUSZQKBD62BA53RFU6ZTM6PQRPHWT X-Message-ID-Hash: JRTAUSZQKBD62BA53RFU6ZTM6PQRPHWT X-MailFrom: mohkale@kisara.moe X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0 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-Country: DE X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1683287021; a=rsa-sha256; cv=none; b=k/jUxq8UKTP8xHhoBb4o1CllPC0Wenf8wy1vTmwI28hTvICiB3nL1xTGxrQrsuCJANDkZB aUprvoz8Um3w/ipNEKozBM4mGfbAMXxjqh++fOfkyJrRNnNQ40rjQsKytcHeEqdMKYP8Fk I1wyA+VazfFfP6yaanyWwO+qtsnln657Dvypc/fWsgORMTXqb8epodrnmnaY0NJnVcVV9k S/MBITATp1hRLnRJ1OpaGJNEaGR1wBdUUdPTWlJW/ZcYgp4JvvLODb7HSMr/KD4sUPB2X7 VpiTlkk8Xxf10vAB/R4OueAytMYshgSthl7WI0YOnRjEs2F77+7Ivl2/voYOMw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=kisara.moe header.s=default header.b=pAhs3wdK; dmarc=fail reason="SPF not aligned (relaxed)" header.from=kisara.moe (policy=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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1683287021; 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:dkim-signature; bh=EIRLu4QfdKZ1ycsFeQVucB9KLqCnKi0SSRFBl/X39JU=; b=GaPqz1bOlzqWYxRvh633KPdUts5qYuAD/gzGnqB478HCC6na5+dCLrXiaxXwoUN6FIHny5 eQrqzBLB0Ul6FRvlAu7qjPNrVuH5Vc95BXqsYG0w/XSuhmYNrLkrV+jw8t5rqtOZTCFH+I ECY9+vbyp2sF8QB8jSBvlU+SfSeDz6Sq/w6TqD3KeJV6ih8G+ldCVKxxZVp5OkLT9HcjHl m4HnTG40DhQxepRJM4XKPQB3ncunwJrgcpcafobm9eughicnDQkVLReJHtYksOvm4tHwMJ GZaGSD5wuYwS19GG4oYXyANTCkQqPkS8Wg7h/Wli6f9Iz+BX/o/bUP0bod1Iag== X-Migadu-Spam-Score: -0.61 X-Spam-Score: -0.61 X-Migadu-Queue-Id: CC9303A8D8 X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=kisara.moe header.s=default header.b=pAhs3wdK; dmarc=fail reason="SPF not aligned (relaxed)" header.from=kisara.moe (policy=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-TUID: XinhR0l/3A4D David Bremner writes: >> diff --git a/test/T310-emacs.sh b/test/T310-emacs.sh >> index 9d0df187..b89a100e 100755 >> --- a/test/T310-emacs.sh >> +++ b/test/T310-emacs.sh >> @@ -1030,7 +1030,7 @@ End of search results. >> YYY/notmuch_fail exited with status 1 (see *Notmuch errors* for more details) >> === ERROR === >> YYY/notmuch_fail exited with status 1 >> -command: YYY/notmuch_fail search --format\=sexp --format-version\=5 --sort\=newest-first tag\:inbox >> +command: YYY/notmuch_fail search --format\=sexp --format-version\=5 --sort\=newest-first --exclude\=false tag\:inbox >> exit status: 1" >> > > I don't understand why --exclude is defaulting to 'false' here. Isn't > this a change in behaviour? You're correct. This is because the new options notmuch-search-hide-excluded and it defaults to t, but when we call (notmuch-search) the value used is nil because we didn't supply one for the search call. If you call notmuch-search interactively then this isn't an issue, the interactive spec will substitute the value of the hide-excluded option. This is why all the tests that use the hello buffer to select the inbox and open a search in it correctly use the notmuch-search-hide-excluded option. This test does not do this. We could workaround this by changing the semantics of the variable. Make it notmuch-search-show-excluded and default to nil so nothing has to be changed in existing functions that call notmuch-search. Or we could switch to using cl-defun and have the default value substituted in the parameter list. I've never used cl-defun with interactive functions but long term I think that's the saner solution. -- Mohsin Kaleem