From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id YGdwLIjUm2JAmAAAbAwnHQ (envelope-from ) for ; Sat, 04 Jun 2022 23:54:16 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 6Og0LIjUm2K7NQEAauVa8A (envelope-from ) for ; Sat, 04 Jun 2022 23:54:16 +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 7F57550DB for ; Sat, 4 Jun 2022 23:54:16 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id C57245F7CF; Sat, 4 Jun 2022 21:54:09 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id 5A6325F7C1 for ; Sat, 4 Jun 2022 21:54:06 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id B05065FC01; Sat, 4 Jun 2022 17:54:05 -0400 (EDT) Received: (nullmailer pid 1311978 invoked by uid 1000); Sat, 04 Jun 2022 21:54:03 -0000 From: David Bremner To: David Bremner , notmuch@notmuchmail.org Subject: [PATCH 4/4] doc/sexp: document range queries. Date: Sat, 4 Jun 2022 18:53:59 -0300 Message-Id: <20220604215359.1311950-4-david@tethera.net> X-Mailer: git-send-email 2.35.2 In-Reply-To: <20220604215359.1311950-1-david@tethera.net> References: <87v8v6mpvt.fsf@tethera.net> <20220604215359.1311950-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: 4BQYMGSLVSWGGI5THWY3TC2FW5M25U3M X-Message-ID-Hash: 4BQYMGSLVSWGGI5THWY3TC2FW5M25U3M 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-To: larch@yhetil.org X-Migadu-Country: DE ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1654379656; 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=u8aYd5hxOpbugmSa/Xr1EtWECfwG8SF5DsV2y2SxLSs=; b=YGELn5caclj7tU/BqSLdXZ2RBStnhMH3yj0zMMDV8SMKTQj7QmjAusFHQadBLlqjXZdvaw d879dFUMHPqg3ym6GGxaJKkwfMejbjPn9M8D+blfvAw7paqAqN1UeSar++tY2wxey23LPP I9TMYFJMEyNuyz/rMhVEj1QQNNEvEStwKDYMUM4K5S3am0wjq9kwVcZ0miQRVh8Kn/If3X 0W/hRjjk7gjmajOTeKjaCG1AzgYqJg6DOOkwo23oW7HiBRJy7R84yar/SCMay5fhkuTF4A 6NhSZBXnGJTJ03dYISCkkrLL+ODGgI0S6S64Y0O1ZtzscmP0YnXUCRyNzvt+gA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1654379656; a=rsa-sha256; cv=none; b=dbxzwgZR9Ol18rOw7wS7worlQ5hb4mEyr5xGWy1xfC2goPYdlgvTzxROo23KAz3zMEVeUv C7+oOGDYlFBR99DfBiU5z/w14QI8tHAFBoSX28/49upZMxPe0evOsXR/4B4wFFWUGPFUhn xdBJhaM3wKYp256YeHPfC9cWCIgJhhnvYLtfiXcwdV4FlbbzGquJ1OgL8YVOWVtKoK4G0K 9i1sHAsMGA5WyBFOeOJ3OZx10FDlwYrUjcMrRkM6CMvAt71l5jPaY/eKkJGT+35SKSm2zk vUTvHCrnLCzuKWv8lxBxZDhCwqwenS5b6rW157hvjAZCaZZANCr20pTLLPQG3w== 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.05 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: 7F57550DB X-Spam-Score: -1.05 X-Migadu-Scanner: scn0.migadu.com X-TUID: CSEMRmLk0IbY Give examples for date fields, as these are commonly useful for user queries. --- doc/man7/notmuch-sexp-queries.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/doc/man7/notmuch-sexp-queries.rst b/doc/man7/notmuch-sexp-queries.rst index 1d7e0ae9..be589f98 100644 --- a/doc/man7/notmuch-sexp-queries.rst +++ b/doc/man7/notmuch-sexp-queries.rst @@ -119,6 +119,12 @@ a message has one such attribute, and ``and`` otherwise. Term or phrase fields can contain arbitrarily complex queries made up from terms, operators, and modifiers, but not other fields. +Range fields take one or two arguments specifying lower and upper +bounds. One argument is interpreted as identical upper and lower +bounds. Either upper or lower bound may be specified as ``""`` or +``*`` to specify the lowest possible lower bound or highest possible +upper bound. + .. _field-table: .. table:: Fields with supported modifiers @@ -240,6 +246,18 @@ EXAMPLES Match messages in the given date range with tag unread. +``(and (date 2009-11-18 2009-11-18) (tag unread))`` + + Match messages in the given date range with tag unread. + +``(and (date 2009-11-18 *) (tag unread))`` + + Match messages from 2009-11-18 or later with tag unread. + +``(and (date * 2009-11-18) (tag unread))`` + + Match messages from 2009-11-18 or earlier with tag unread. + ``(starts-with prelim)`` Match any words starting with "prelim". -- 2.35.2