From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id cGEzLbPUI2fOZgAAqHPOHw:P1 (envelope-from ) for ; Thu, 31 Oct 2024 19:04:19 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id cGEzLbPUI2fOZgAAqHPOHw (envelope-from ) for ; Thu, 31 Oct 2024 20:04:19 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=AFkTWnYf; 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=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1730401459; 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=2mOjaerZ1DZwgwYPPz0vP0FhCurFnp37QRsr4dBeY8g=; b=tAR+2MlEx5TAoko0U0uljaOkyD5k8boAkRZcYwL3PGRpasV3MZbYdm9nZNn3okwVjQbcAw STEai2KzcNv/RBLjcSJwFxKBvygEqBivzr4wuCaPl3v1IFu5R8e3WL3MJmkpfUoJgU82Y0 MpGqgS1s3UWCDpwRtYkaCKJyUtZ81f+oiHRkW2tyUu1s4kFNMt4pbCM87i0gypuHm5nSfW tihyLykhd/qo0ZT4RL2e1f4VJwmywcmYPQBFqQxYBx0jciB0KNFqgNQH+ZN6gz22oGJbGB gxcx4NogeDWND63K1xiqpKcJsehYxyRVfwBh6CkBYJOKYrPQC5KAPS+0fs0csw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=AFkTWnYf; 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=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1730401459; a=rsa-sha256; cv=none; b=R41RekAb5x5tIwA3/HaGzyZtYECb7RWUzfY8A6XiM/lNWIVccqNA8RPc/zgGUOuZ8y7gQR IBC7FzfHAYCANTskYRHbj8lx+nML0UdT2nOYfWwK0Jcn4vxFTZYLk0Ru8DoUfq1SoV689L 4jPfIgKj1KiFTVbudZrpcDUI+WEvXHhbuQIay2tgFvc18petkpNgItViOs4d3ykgqjK/Uu 38yVLaaU3OXY8c5/bXdG+4+9hnOGZjVeKtgelkZ+gNZdLWezeWoAHnHgqTsErIntViNET5 r+UDixoMEvTbmTlvMvdLq763nfb7qbRDYihi8cvTvvxrqUyh+PzLgcLEsTIv0A== 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 085387D1CC for ; Thu, 31 Oct 2024 20:04:19 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t6aSG-0006tl-4B; Thu, 31 Oct 2024 15:03:36 -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 1t6aSD-0006ra-RB for emacs-orgmode@gnu.org; Thu, 31 Oct 2024 15:03:33 -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 1t6aSB-0006QR-LG for emacs-orgmode@gnu.org; Thu, 31 Oct 2024 15:03:33 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id C1CD9240101 for ; Thu, 31 Oct 2024 20:03:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1730401409; bh=Hjt3g/vqn0cZs6csRTg1aN91OQhDU1jISyzQ44pSl7I=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: Content-Transfer-Encoding:From; b=AFkTWnYfiaGWzZb5uvIghThpMTMfvveD5VHd2bWj/Wzq5XDj5ox3aTK+NAEDxegY0 yeYks0Qjx2A7wInL2noOY3LroZt2aI+HK63I93Nue7tD0bEbOBbPEwsqwJOy51oiEV jJi7ZbEg9+h/vY/OYAndpaNvqvdablMwEHl3JzybyxgkuHB3V/0PRQW3a2d+Slsb4t Qoqsem8w6BouhObOWMxTdlpMrbNbZ4+UWen5yI+pKju6N+WSSSROY8awj0vOe72rQw iQC0rM+zfZ94d5ewflEovoso1CI/hwa79oRHnKXThUSqAM9J0ghGaQfT3EnnhZZAYC gm62xv/QqJsYQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4XfYL91NrVz6tm4; Thu, 31 Oct 2024 20:03:29 +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: <87ed3wnlv4.fsf@gmail.com> 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> Date: Thu, 31 Oct 2024 19:05:12 +0000 Message-ID: <874j4sccuv.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-Scanner: mx11.migadu.com X-Migadu-Spam-Score: -0.04 X-Spam-Score: -0.04 X-Migadu-Queue-Id: 085387D1CC X-TUID: p9j7/j2py0MA Tor-bj=C3=B6rn Claesson writes: > (defun org-cite-basic-follow--setup (_) > (transient-parse-suffixes > 'org-cite-basic-follow > (cl-map 'vector (lambda (group) > (cl-map 'vector (lambda (suffix-spec) This is getting complex enough that you can split out this lambda into a dedicated private function. > (pcase suffix-spec > ((and (pred stringp) label) > label) > (`(,key ,desc (,fn !citation !prefix)) I think we can do yet better: `(,key ,desc (,fn . ,fn-args) . ,other) Here, `(,a . ,b) is matching a list with 1+ elements, with b collecting the cdr of the list. Once we have fn-args, we can simply map over it and search for '!citation or '!prefix symbols, replacing them with appropriate values. The final return value will be (using backquote-style list syntax: 10.4 Backquote in Elisp manual): `(,key ,desc (,fn ,@processed-args) ,@other) --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at