From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id WH2uA+QKJWfDbwEA62LTzQ:P1 (envelope-from ) for ; Fri, 01 Nov 2024 17:07:48 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id WH2uA+QKJWfDbwEA62LTzQ (envelope-from ) for ; Fri, 01 Nov 2024 18:07:48 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=bC0S8s7F; dmarc=pass (policy=none) header.from=posteo.net; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1730480867; a=rsa-sha256; cv=none; b=iAClqAIoN78JgF356xaYn5i0hHPbx06JTG+6219cADGWMqwMMssefcmDqIovZnwymudOdM 5ZWdn+V29qAArYAE5eF2w3T+MPb8/NytzRprfRPBmMLmkmYHINChKulg4zw4IKpy8LGzV4 yiff5Exv1uOXCbZq8aHpdPbJYupxYSCu8b9jYLfd0t/y3EYyYR8gaFj4YyaOlnsjzidNi7 mL29ba7NKMYcQm0DqgaAwOA3RXetKK2hRWajbYN9lHvPBBGlrGI3FHkvlgGVr7GTvWZz8/ 94O+Oo/PEjr17q3NZmM7VT7eFw8hKMZgnsYJsrC8Gvhk9ZwQTHnEa/OWNvIOtg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=bC0S8s7F; dmarc=pass (policy=none) header.from=posteo.net; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1730480867; 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=W57f7w5GZa9H/S6VGbQ52KhqSBnUqyespnOg4dvoy0c=; b=neNZEHe9WhHxTkRN9L2zxbAIsGspIxAGCQrBCYRvalYhGB57LTLdDq2uAP21+o4eQwdWtR 98RjbK4eGOilrJ9Os9iY+82ed98VfnYS8r1bisgMqBsnn36V70VWZKNxcnwwBhAoiOgNrP cD9ukNj8JuCpult3JixunftTs0uzfS4CsDAudNfAtDglZ2mQR1OWB2yQv4kZmLRhbnM14o HA6AVzckZnjyidC9oAMr62Kvfk7yQYlxbnptG0kj4j5lR8eUTrXsR+vIh6NmazWrgOv9EF 22E7u98Jxzo7Ole/QbdHPTffcAmZNmD5545gu6XfecJkvHDKNeopLmZ6F/UeeA== 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 2C19632C1B for ; Fri, 01 Nov 2024 18:07:47 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t6v6p-0001RF-7D; Fri, 01 Nov 2024 13:06:51 -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 1t6v6l-0001R0-PX for emacs-orgmode@gnu.org; Fri, 01 Nov 2024 13:06:47 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t6v6j-0005oq-Da for emacs-orgmode@gnu.org; Fri, 01 Nov 2024 13:06:47 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 38185240103 for ; Fri, 1 Nov 2024 18:06:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1730480803; bh=OSOSN7UsAyTY0s+NjME0lZDUFah3lRp6yLKCwl3ceQc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: Content-Transfer-Encoding:From; b=bC0S8s7FY8WumkA5DbnYMhzZmQcAzQLzYERtC+MQLFvD8wgbw2/tKRorRl/76zfyZ jySfekic/88JS6v2gXIwgoZM9V7ZqjYa4mJNnmclmLhobGJxx2MUZPoCDtgpS6snOm pJ4XIW56BQF4e62n9WlhuzgII+8oHNbI0RQsxWXUMooPM6R+xLDu0k9C/VnB9EevET xZU2d/LGE0ptRZqDJOQv+feeWR5PgqWlhDcAgWeYM99W3+YIqrjB7oSNAnwkt04t0Z ZEcDDLoK3TnRV5TCOtDDVeTtdP89DYga1JkELidAAtHEgb3b9p+fCEkTCJ+jL8ykyx vTM9dSkMFV8tQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Xg6hx1qDRz9rxB; Fri, 1 Nov 2024 18:06:41 +0100 (CET) From: Ihor Radchenko To: =?utf-8?Q?Tor-bj=C3=B6rn?= Claesson Cc: Jonas Bernoulli , emacs-orgmode@gnu.org Subject: Re: Org-cite: Replace basic follow-processor with transient menu? In-Reply-To: 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> Date: Fri, 01 Nov 2024 17:08:24 +0000 Message-ID: <87a5eievav.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -4.00 X-Spam-Score: -4.00 X-Migadu-Queue-Id: 2C19632C1B X-Migadu-Scanner: mx10.migadu.com X-TUID: KEuDoJyYaAj6 Tor-bj=C3=B6rn Claesson writes: > But that was not good enough - we do not cover the case of specifying > a lambda in org-cite-basic-follow-actions, > or passing other arguments to the function than citation, prefix or > citation key. > > This updated version fixes this, so the action can be either > 1. a suffix (as in transient-define-suffix) > 2. a lambda form (as in (lambda (citation prefix) (interactive > (transient-scope)) ...)) > 3. a function call, which will be wrapped in the ugly dance-lambda and > where !citation, !prefix, and !citation-key > will be (recursively) substituted but other arguments preserved. Rather than going into recursive replacements, simply let-bind !citation, !prefix, and anything else we may want to provide around the lambda/function call. > (pcase specification > ((and (pred stringp) label) > label) > (`(,key ,desc (lambda . ,fn-args) . ,other) > (list key desc `(lambda ,@fn-args) ,other)) > ... > (`(,key ,desc ,suffix) > (list key desc suffix)))) All these special cases can be simply handled using (other other) ; if not a pattern we care about, just retain it unchanged pcase clause. --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at