From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id AF7wBmf3A2GJhgEAgWs5BA (envelope-from ) for ; Fri, 30 Jul 2021 14:58:15 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id QMOpAmf3A2GibQAAB5/wlQ (envelope-from ) for ; Fri, 30 Jul 2021 12:58:15 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (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 B95E310E98 for ; Fri, 30 Jul 2021 14:58:14 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id C4EFC29319; Fri, 30 Jul 2021 08:57:04 -0400 (EDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id BE20529201 for ; Fri, 30 Jul 2021 08:56:31 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id A9A185FD17; Fri, 30 Jul 2021 08:56:31 -0400 (EDT) Received: (nullmailer pid 2166898 invoked by uid 1000); Fri, 30 Jul 2021 12:56:10 -0000 From: David Bremner To: notmuch@notmuchmail.org Cc: David Bremner Subject: [PATCH 16/27] lib/parse-sexp: handle unprefixed terms. Date: Fri, 30 Jul 2021 09:55:56 -0300 Message-Id: <20210730125607.2165433-17-david@tethera.net> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210730125607.2165433-1-david@tethera.net> References: <20210730125607.2165433-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: D2QL5QA6CTWSKMHYMBKOKDJSWKR75ZLO X-Message-ID-Hash: D2QL5QA6CTWSKMHYMBKOKDJSWKR75ZLO 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; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1627649894; 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-unsubscribe:list-subscribe:list-post; bh=7GAEEoyLehwrjp2oTKJ92+k2N+k6zZ5Df3VFs1E20mM=; b=VCg/lKPltZSbKBwCRh1R/aMR5fn8sWX+oDwJhPg+gsFjor9j/NutXtFSjlbeaBonsveuEq M7l+EBuN1i6YihbzlmVdKiUXRM8Wr7PiMtXKxHDSOWzlnVh8mmUEh0pMhh2Gz+EbBcVq/H h+1SmWh6xGr31d0tUjyL6kK87bp7oDGzvw+zyhR3yOsYmRKhXcUwm4NsgY5reKvMHUPXAr WKgl7HpqcJYaAKKL17DBf6WttMhrSctHiG6Z7CL14a9Qjwq21vqjGwOg6cY0GGky3rCU9q loeqa5Ec6ydgkp/+aCBOkmhTu+wv3OkQFw6vVIu8UI6P+fbXGORWvkocFnZ+8A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1627649894; a=rsa-sha256; cv=none; b=k+stcJXXn/d1rBlPJFaKjGKU4kWyw9LSQupe7rE/KSzYrg+VxsEHlGQ/8L2cTT1IAIp8JU vsfNmW29xBaywFZjsj00Vdu0eHqvNif2bF1gch0Imt4qrvILthPRxckT2NUDvcfuVEChSh Yv93XmJlE21BpmE7jLeWaCARVNs/ykRWS5KlOnPUGdx/eNCBE7x4hpn47OBYt+A+zd622r ohgIpPCkGDx77ULC+HrHPEjdIPsUWGdaxevaJBvcoE2WIo4vmvSSFXlmUUvWoh16QQah/b lgGL2EZoLAFYSEJFaYzAJ3WfflxaHO3UsUJ+HafkOwFvPAoeHI7pK4+B+SBEjA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: 0.62 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: B95E310E98 X-Spam-Score: 0.62 X-Migadu-Scanner: scn0.migadu.com X-TUID: cxKADyIDO+pZ VGhpcyBpcyBlcXVpdmFsZW50IHRvIGFkZGluZyB0aGUgc2FtZSBmaWVsZCBuYW1lICIiIGZvciBt dWx0aXBsZQ0KcHJlZml4ZXMgaW4gdGhlIFhhcGlhbiBxdWVyeSBwYXJzZXIsIGJ1dCB3ZSBoYXZl IHRvIGV4cGxpY2l0ZWx5DQpjb25zdHJ1Y3QgdGhlIHJlc3VsdGluZyBxdWVyeS4NCi0tLQ0KIGxp Yi9wYXJzZS1zZXhwLmNjICAgICAgICAgfCAzNiArKysrKysrKysrKysrKysrKysrKysrKysrKysr KysrKy0tLS0NCiB0ZXN0L1QwODEtc2V4cHItc2VhcmNoLnNoIHwgMzUgKysrKysrKysrKysrKysr KysrKysrKysrKysrKysrKy0tLS0NCiAyIGZpbGVzIGNoYW5nZWQsIDYzIGluc2VydGlvbnMoKyks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