From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id iGoACNubJme+xwAAqHPOHw:P1 (envelope-from ) for ; Sat, 02 Nov 2024 21:38:35 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id iGoACNubJme+xwAAqHPOHw (envelope-from ) for ; Sat, 02 Nov 2024 22:38:35 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=lyQ48IOc; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1730583514; h=from:from:sender:sender: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:dkim-signature; bh=lUBpTvydoVPSB+EZUk1nP8Lx4IEFPnAFlS+o/ou9Pbw=; b=gULMUc783O7OQ1Aw1G0rpDrBimSaGhXIBI/Lp1A47mgWWdg0wPUOGFOm7peVzSTQq1gcdT LWTx24tzUEDRl2VVTPf9nOClIbavTUZcekIsipor1+RN27ShrHA3Cek2uRpFOAmeZ4FP+S 0rGCm+6hTtxuMN3qro6Ukxqcw7cGPzpmdfnOoQriDmLET/PduJGZHNgE4erxGMkTFxbMz9 jaRZsrsWtkU8aFFozAkchOsBzFHVi30O8KS01D+f2mw9Ixo1ClQ01suQ6sraYZmkGM+SYc SYYXy3uL1bk43FwOhAeRfE1puYOQCzoEgGjNxJaWehKZCrsUa2h/U6Lz+L0Xig== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1730583514; a=rsa-sha256; cv=none; b=Kmh6gWjK2/bJx2vkX4omx43DNhtrXgC2hriFpZxOlscG/S+T95ocob/9M+R78qX/mNt76F ABNNHif4jum+LkH6iH9Y5KjxmxJNZh7nQmhEwTl7K4buQb8NQ/Gn11Is7NnQhzeXHfsdgN TOMZGXey4hcXmmQdsyYJGhHDT43JxOGHqs66GJccD5NzhKzCfGPqErZ2LumAzos4oeTf5T 08dNzC5rcOJqEqedrvRPy9CEJtAgvo8sjgViDOhQCRPqagKIW8qZSAT7AmN7jqGHISZCDl a2QwcwHQQuY/OnI/SwJsjqsDOU0DoWhqRD2xT6eyx9XCH3tDDnAFKv9XJ75dKw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=lyQ48IOc; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6BD1685113 for ; Sat, 02 Nov 2024 22:38:34 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7Loa-00027H-61; Sat, 02 Nov 2024 17:37:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t7LoY-00025u-38 for emacs-orgmode@gnu.org; Sat, 02 Nov 2024 17:37:46 -0400 Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t7LoW-0000oP-Kz for emacs-orgmode@gnu.org; Sat, 02 Nov 2024 17:37:45 -0400 Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-539f58c68c5so5652377e87.3 for ; Sat, 02 Nov 2024 14:37:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730583461; x=1731188261; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lUBpTvydoVPSB+EZUk1nP8Lx4IEFPnAFlS+o/ou9Pbw=; b=lyQ48IOca/L4bcJ6ZcJEv/YOuG/+gVcDLvKCFcEMar53CESjkiDRzNuZdq0rJPsPok 3a2HdrMGYr+UCQvU4evk9FnLmL1rVHBkTvwRMK/qIJf9CQ6U362nFNQ1iM0TVi+NK28R yq19rgavFprVMZoXY24zT3ba7jpMjpDOQ/QSZ6RpP77p26bRGD3VTHVN9FuN/XaxWjHl yA8jNuv0mdAqLCXKPulBDhqeqbA3RBgEVXdolESvgt/wwLqGBEU8kYElV5IBURdtu65G RefiNfT6jaxnQEFdvRtQwJukR9gpg+RU60hBDA5sarXQmKGEH9FsBT6z1rLU5fimfATJ tQHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730583461; x=1731188261; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=lUBpTvydoVPSB+EZUk1nP8Lx4IEFPnAFlS+o/ou9Pbw=; b=mVZ3Zbs2OMvpGtExiKBRpNHj4UMn0jHFGoafz5jJp6/E4H43bpZWAZn437tRjHd/9d r4qZ5/txI/0h/fHp71QJHFtfQ8VRgTTVrGEjljz6MBwqbcxLZBXZZrX9zoFNgvnScIvv qOYwwKTDQHuEpAcoVwXuNSHxa8lK5bDrEnoh3/1CKANvfBUTni5Iyohk86WfBHon31s6 ZxAr041pFF2jaode+Yf/6gxSoFRXqkqMXFI33/8hyQZQkIr7yvQ3VF8e3+WuohyeDWOK pTmtbnsoEVqkKzQh5MOIpAcivOUhYPWnj/KrXX6nBValOZumoNlqkpLHGJJiKpF6U+WA lB2A== X-Forwarded-Encrypted: i=1; AJvYcCWUok3Db6xVtOTbNgEVAkR6yo7vTA9u4kn/OeX39WFzCy5JC+gSu+aciYOzpt5dJWxI30KFB6qkn/dkg29x@gnu.org X-Gm-Message-State: AOJu0YzykXpFCBA+MyRKqL7WPUrm2mjCvue1slhdAwCQLe+f/eTxgwZn dcWSKvsH8aeZ5/MT1wjMJGVg3XoeAcnP4MWr3E81ZErHrjUlOpCJs6+B/g== X-Google-Smtp-Source: AGHT+IH8L61O1gQQqmyoARRJKp13+bPAqNowhVvnALAzPkZdE0BGFFsOAdXp78hNzfHTpDiR78mXog== X-Received: by 2002:a05:6512:124c:b0:539:9ee4:baab with SMTP id 2adb3069b0e04-53d65df2701mr5911530e87.30.1730583461045; Sat, 02 Nov 2024 14:37:41 -0700 (PDT) Received: from barbar (89-27-102-202.bb.dnainternet.fi. [89.27.102.202]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-53c7bdcbeafsm1057651e87.195.2024.11.02.14.37.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Nov 2024 14:37:40 -0700 (PDT) From: =?utf-8?Q?Tor-bj=C3=B6rn_Claesson?= To: Ihor Radchenko Cc: Jonas Bernoulli , emacs-orgmode@gnu.org Subject: Re: Org-cite: Replace basic follow-processor with transient menu? In-Reply-To: <871pzte929.fsf@localhost> (Ihor Radchenko's message of "Sat, 02 Nov 2024 19:21:02 +0000") References: <8734m28l9a.fsf@gmail.com> <874j6h3rw8.fsf@localhost> <877cbamq2q.fsf@gmail.com> <87cykvrgwr.fsf@localhost> <8734lpmkjn.fsf@gmail.com> <87r08lqlbu.fsf@localhost> <87a5ewfvo1.fsf@gmail.com> <87r085vb1s.fsf@bernoul.li> <87bjz9o188.fsf@localhost> <87r0839jfc.fsf@bernoul.li> <874j4ueo1x.fsf@localhost> <87bjz2tam2.fsf@gmail.com> <87msil77oi.fsf@localhost> <87ed3wnlv4.fsf@gmail.com> <874j4sccuv.fsf@localhost> <87jzdo2e4m.fsf@gmail.com> <87a5eievav.fsf@localhost> <87wmhlmp83.fsf@gmail.com> <871pzte929.fsf@localhost> Date: Sat, 02 Nov 2024 23:37:37 +0200 Message-ID: <87v7x548ri.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::134; envelope-from=tclaesson@gmail.com; helo=mail-lf1-x134.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -3.72 X-Spam-Score: -3.72 X-Migadu-Queue-Id: 6BD1685113 X-Migadu-Scanner: mx13.migadu.com X-TUID: 6LaiDugGaGPV Ihor Radchenko writes: > AFIU, you need to match against lambda simply to avoid the next clause > matching it. Exactly. > If so, you can change the clause to match all ,fn, except > lambda like the following: > > `(,key > ,desc > (,(and fn (guard (not (eq fn 'lambda)))) > . ,fn-args) > . ,other) > > This is getting ugly though. > An alternative would be simply > > (defun org-cite-basic-follow--parse-suffix-specification (specification) > (pcase specification > ((and val `(,key ,desc (,fn . ,fn-args) . ,other)) > (if (eq fn 'lambda) val > `(,key ,desc > (lambda () > (interactive) > (let ((!citation (car (transient-scope))) > (!prefix (cadr (transient-scope))) > (!citation-key (org-element-property :key (car (tra= nsient-scope))))) > (,fn ,@fn-args))) > ,@other))) > (other other))) I feel that the guard option does the right thing by directly fixing the pattern matching - but what approach do you prefer? Is this starting to be a good time for me to produce a patch? Cheers, Tor-bj=C3=B6rn