From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id L7exE7kQK2AVGAAA0tVLHw (envelope-from ) for ; Tue, 16 Feb 2021 00:24:25 +0000 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id YHQND7kQK2C2NgAA1q6Kng (envelope-from ) for ; Tue, 16 Feb 2021 00:24:25 +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)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 52AEE223D5 for ; Tue, 16 Feb 2021 01:24:23 +0100 (CET) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 320DC26A29; Mon, 15 Feb 2021 19:24:18 -0500 (EST) Received: from mail.hostpark.net (mail.hostpark.net [212.243.197.30]) by mail.notmuchmail.org (Postfix) with ESMTPS id B30A01FC00 for ; Mon, 15 Feb 2021 19:24:14 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.hostpark.net (Postfix) with ESMTP id AFCA1165C8; Tue, 16 Feb 2021 01:24:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=bernoul.li; h= content-type:content-type:mime-version:message-id:date:date :references:in-reply-to:subject:subject:from:from:received :received; s=sel2011a; t=1613435051; bh=uYpWHnsiVjVl/JggBQGTq7SO +s/txVQEzCHrr+7AeZU=; b=F7WfaJEZaEhfYeIuHY6TvkUiZMHIgLy5aUV3pQav KgPNmPdp7ymiTnJPjy2Jxq4UNtwzfRF5eis/WFfszksZO7bkczFFTviyVwmqukgw pYwAR1oeFvpiYr7NZx/coJM2KPTxl/trXskyKawkj8V7c46ANzWGzetdYI718a6n OH0= X-Virus-Scanned: by Hostpark/NetZone Mailprotection at hostpark.net Received: from mail.hostpark.net ([127.0.0.1]) by localhost (mail0.hostpark.net [127.0.0.1]) (amavisd-new, port 10224) with ESMTP id EPR9VQYQ7QvU; Tue, 16 Feb 2021 01:24:11 +0100 (CET) Received: from customer (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.hostpark.net (Postfix) with ESMTPSA id 7C2BE165C5; Tue, 16 Feb 2021 01:24:11 +0100 (CET) From: Jonas Bernoulli To: David Bremner , David Edmondson , notmuch@notmuchmail.org Subject: Re: [PATCH 1/2] emacs: Use pcase in notmuch-search-insert-field In-Reply-To: <87a6s5t4k7.fsf@tethera.net> References: <20210107172523.369192-1-dme@dme.org> <87a6s5t4k7.fsf@tethera.net> Date: Tue, 16 Feb 2021 01:24:09 +0100 Message-ID: <87sg5wlv12.fsf@bernoul.li> MIME-Version: 1.0 Message-ID-Hash: LVHDNXORYDOL672GRST24AWRH3AWR75K X-Message-ID-Hash: LVHDNXORYDOL672GRST24AWRH3AWR75K X-MailFrom: jonas@bernoul.li 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="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: 0.69 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=bernoul.li header.s=sel2011a header.b=F7WfaJEZ; 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: 52AEE223D5 X-Spam-Score: 0.69 X-Migadu-Scanner: scn1.migadu.com X-TUID: mxPSATsiTdp/ > David Edmondson writes: > 2. A glance at the pcase docs suggests the cond wrapping pcase can be > avoided by using (pred functionp). Of course I've not actually tried > it. (pcase field ((pred functionp) (insert (funcall field format-string result))) ("date" ...)) works. Tried it, because I haven't done this much yet. Jonas