From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id eJEiFccOp2IDcwEAbAwnHQ (envelope-from ) for ; Mon, 13 Jun 2022 12:17:43 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id qKIPFMcOp2JXxgAAG6o9tA (envelope-from ) for ; Mon, 13 Jun 2022 12:17:43 +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)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1B6B33C598 for ; Mon, 13 Jun 2022 12:17:43 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 3ED065F6E8; Mon, 13 Jun 2022 10:11:30 +0000 (UTC) Received: from mail-io1-xd33.google.com (mail-io1-xd33.google.com [IPv6:2607:f8b0:4864:20::d33]) by mail.notmuchmail.org (Postfix) with ESMTPS id 70F315F6B8 for ; Mon, 13 Jun 2022 10:11:27 +0000 (UTC) Received: by mail-io1-xd33.google.com with SMTP id q11so5536625iod.8 for ; Mon, 13 Jun 2022 03:11:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=l2+ZDI9LC8jHwoFZUAXuseHFi8FVpfLlzCBakAGbF8w=; b=N0hrFcr9ZBd3mXel+8ka9QtFNqhSFBLN5gHIX0fcOy7oInb7RclIGSiwkGdOvZAMTy FpZnpZIrldyBaN92Ug4xhQ+Qi/BnQQ4HbjJWhVgks5q3djAX0Be3wAydBwYskUp2sZT3 MM878NJ6e6vqKLyGMKq3M+NM8PeG6MPGtusyGNf6Dke2utUbdaIb3I9cHhUKrJ4wGI14 9U1AmP2arlFoCs+Xgz11pbpe7dP7GPOLmZAYry8a9UMzpFQkCTExa4Vf0sLXjKAYaPSQ FMSWR6E9XZ0EiBrQ/IWL6Y5XlM00CyzJYdBDJHzSy6rjW1DU/O+k/azmc14dVb1v0Gxs 07Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=l2+ZDI9LC8jHwoFZUAXuseHFi8FVpfLlzCBakAGbF8w=; b=pFgJaGZlEqcdhD6PGbeuLmwqJZ9PKyQ308xGT14hkdBH3IVSsNfrTqIaR/P1fb8XZH bxnDU9/sedAal1mG0yXnlnqoe7m2ivk0l4VnCjoGDn0YqQ9bFjAgZHC9Ae0W2RbDPiel +VVBkIqHezf4M6KbHHh4iJIrhuSmOIYAjQaA12xMdMU8Dok+R3QJVKJMSp1y0ctXFUeb 51IllfkzNQB/TTJyEMGUK2OvexmTKKBLGH1xG3tpW4EVOr6dwp6hCXFLVFcTf7Rt9dGq Ernj8k7+oCPBSsehVeWie45f844mi+Mcbm0Sw590xL32XA2rv0Cvxrdw0We9gdmxD8CD znTQ== X-Gm-Message-State: AOAM532zmv7OhuAAbZHPKPNmFuSupSg0wQgUgSYc5bKZZ/4okDLm63J9 WMioS26F9FePKtX4KrlFVRabiMpmbn4wOaQkrZNYYFnM0vWL2g== X-Google-Smtp-Source: ABdhPJyUERDnDqiYUbiKNnkDbIU3+6Q3WyG4BIBSQilzleIvj4ifY2ZrCN7CzgSgRgc7SlbnScSbLN1vI8JVb8rOUiw= X-Received: by 2002:a5d:9bda:0:b0:668:5cb0:d91e with SMTP id d26-20020a5d9bda000000b006685cb0d91emr27764870ion.92.1655115086193; Mon, 13 Jun 2022 03:11:26 -0700 (PDT) MIME-Version: 1.0 References: <87o7yxqxy6.fsf@code.pm> <87k09koqog.fsf@code.pm> In-Reply-To: <87k09koqog.fsf@code.pm> From: Michael J Gruber Date: Mon, 13 Jun 2022 12:11:15 +0200 Message-ID: Subject: Re: sexp and strings To: erik colson Message-ID-Hash: K3LOC2JYKOQLY3F44RDEKHUGMPB57G3U X-Message-ID-Hash: K3LOC2JYKOQLY3F44RDEKHUGMPB57G3U X-MailFrom: michaeljgruber@gmail.com 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 CC: notmuch@notmuchmail.org 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=1655115463; 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-owner:list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=WkT13pzGutpTx17J9flM04VxtylalKRE3YdkS4Dg3sY=; b=Uiel0qdNbGsDATAyrSKfm8NS1H3dJ4HIL0l2m6Vao9jL5S0u7G4qUA/LqdUpoUcaVILzu5 DiY9NNFpcGYW6sA38oliJxTu8b2GKjJ32b5/CDqJuoRWdNybyx9DMm5nPchAMsViRvKJRz YRrlQA2kBEpdp7QkAP6hvzTNCt1qipwXx4QMmJWmHpMWYKJKGPzznNWCRwQmDeWay0j56b ZZu5GAwYUgab5AVt9eE0sRor05ueIsTelMsVGkExzhyOFbez/OL0bflFmgzIs3rVXE/oJm IoVFWVvmaQ6lLJRjAhU589ogIA98fY9VHCQLXiazMb3Js8Ax+qKaUQhkpwY1Eg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1655115463; a=rsa-sha256; cv=none; b=KWbZG9aHibQUXRFqbVkkMG9fRzOa4sf20BzNg5x3NLwrVYibi4SlehwKdAbxIGpuhROglp xQlc0zaAAZiUGzdnrPN5WR68/Zb7iPKLjk833HXX52tp9yXvo3/V6NLg6fMGxvaQ1FzFZ/ 8JyCjYenfN1w3f0Shcd67bM+W/h7WZY2x8iEdPEsbLeLD4o09NiAPloNx0S+4uxD5C7dOn XB+ieDdCi1MonHfA4Z+xlLJxz5Cv8zE7bjE/ZUN2DHK12KkRtI7DyjfZfX7x1tY6Lb4S4A kSwPRgX5jhr9I08PBTLvaIOfXcQtSzVZ9Lrl1yMlYRb1cpMRTcn58BJzZAhKVw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20210112 header.b=N0hrFcr9; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (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-Migadu-Spam-Score: 13.44 X-Spam: Yes Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20210112 header.b=N0hrFcr9; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (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-Migadu-Queue-Id: 1B6B33C598 X-Spam-Score: 13.44 X-Migadu-Spam: Yes X-Migadu-Scanner: scn0.migadu.com X-TUID: fV4XBhvsao9a Am Mo., 13. Juni 2022 um 11:31 Uhr schrieb erik colson : > > Michael J Gruber writes: > > > That search works without the macro, but not as a macro: notmuch > > computes an empty `Query()` for this (as per `NOTMUCH_DEBUG_QUERY=1`). > > I'm not sure whether this is intended or an artefact of the > > implementation, since both the macro and the regex need > > expansion/evaluation before being fed to xapian, and the order > > matters. > > > > Defining `D=(macro (dossier) ((tag ,dossier)))` and calling it with > > `(D (rx ddddd))` works, btw (but is not what you want, obviously), so > > something tells me lazy evaluation of macros is not completely lazy ;) > > Thanks for checking this out Michael. I decided to write an emacs lisp > function which I keybind and which prompts for the variable, and then > launches notmuch-search with that: > > (defun ec/notmuch-search-dossier () > "Zoek mails van een dossier" > (interactive > (let* ((dossier (read-no-blanks-input "Dossier:")) > (zoek (concat "tag:/" dossier "/"))) > (notmuch-search zoek nil nil nil nil)))) > > This works like a charm ;) Well, I am of course open to enhancement > suggestions! > > Also I upgraded my OS to fedora36 and now I use the standard notmuch > package instead of compiling it myself. So I don't have sexp support > anymore and therefor I am moving the squeries I added to my notmuch > config into emacs lisp functions. FYI: I submitted sfsexp to fedora (review pending), and as soon as that is in, I will adjust the notmuch package. (Until then there is copr mjg/notmuch-sfsexp at your own risk ;)) Cheers Michael