From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.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 kDqGGMnSI2eXEAAA62LTzQ:P1 (envelope-from ) for ; Thu, 31 Oct 2024 18:56:09 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id kDqGGMnSI2eXEAAA62LTzQ (envelope-from ) for ; Thu, 31 Oct 2024 19:56:09 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=nqu65utG; 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=1730400969; 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=oCd//P67VCppVcDGkbyPaMIykyaCxgWVyCpIrL2j1nQ=; b=ZogyL14KPpXQ/09KR3FfEiUulAklmqgocRRXYdWeVNu23OryW8LYzOtByAkG7K1KFvePL2 +xUNlW2+nKPlUYgsqlfhNrYEXmpCQeppess7D+q5JWKxpgYzACKinb+sh8e6RP1d8uMkpH y1C2+vgcw6ywKLgOmbmnNobpLWJNTqhNWPXikZ/kzvv9nU5rPUw7k1hklplOCBLLmcjhue PzD8Gt2rMShkRHe7j0kA+k04r6UWwu891wkdOFjlcZEelfUeDze8oOHmqOq7+CwwDJ9Zld I8rJsb5KdI75AhJjkFZpNsBZuwpjKCF68OGmhXIEvTMlcRVuI9uK46+SzHqonA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1730400969; a=rsa-sha256; cv=none; b=M41HglBl5SPrQfeARupMGWDZD0ANP065uqXRuoeOeeMr6UGOC8sfTjOe1zlEFMFoACFBtp jSsUW6eQXW7spIIZuui4CVOvarP63h441xKXjEa3mkac8gYlCBe92SoiXMfhm7VnwcGJdP brQf7w+ZErO4AvtLqcAFCufWwhTBd0SaJ1/G1ip38XpNCk/Sm1GZBoBj91nUq5C6J2jiiW n5RcIXChH6eWuKjbShaYOrmRg+Vye6oKHFbB6OxUiGl9WIys6E04t2ckx7tzCB5jm0rzzk H2AI52XdewKuxmdp8oda2Ly/szMGezJ3qgNcDzVRMXCiVoY1iE9/2Mmh7xVntA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=nqu65utG; 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 DEFE2860D3 for ; Thu, 31 Oct 2024 19:56:08 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t6aKJ-0004P6-4k; Thu, 31 Oct 2024 14:55:23 -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 1t6aKG-0004Oh-Q7 for emacs-orgmode@gnu.org; Thu, 31 Oct 2024 14:55:20 -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 1t6aKE-0005qy-Q7 for emacs-orgmode@gnu.org; Thu, 31 Oct 2024 14:55:20 -0400 Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-539f1292a9bso1593468e87.2 for ; Thu, 31 Oct 2024 11:55:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730400916; x=1731005716; 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=oCd//P67VCppVcDGkbyPaMIykyaCxgWVyCpIrL2j1nQ=; b=nqu65utGZ7odrczGs9Uw4+XZxA8eS0SHstSiSnA7NUR5NObYrP2FwLt8OPVZKrtXl8 tf3RVViV9eHoMogl7Y8yEuT4h69RC2ckvyTHODgkQzKFNuRPBhc8fddBzKBEsgjuv30M Zmm+FxKt0PpjEwxihtc/K23iSke5jrticDOht0IvUM5gVaf7W6fkDL+esK3g+s+nJr13 VqrvaAH93IZqk4jac+Jogsgux/jqoc5vKu4CBQ/2GKKp9NZlGKp8wWAHX3mOPQ/11AeV gj8prpUoyuEIKEGJ2g+IrDeALijs3Gyv11ioxrEGNBD+YOmGZYs9pEehIRHZsDzE3CLB O7dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730400916; x=1731005716; 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=oCd//P67VCppVcDGkbyPaMIykyaCxgWVyCpIrL2j1nQ=; b=KWzlGIbMqBMK6kXT08gzVHA7urtwGSRC0/+PLbqRCsWUnxjblu7nO+4Yd8wFi0UaXJ hy3Bgim8teGNEtioeR+VVxVo96hRJL6jrbzATcyokyiQBq9Ab5ciaBKtUGv9mAwuCaBP r1liVKUJ8n8030YkuLHsvEy0jqCRvt2l4agPklJXYctxBphtekepjUT463hZuyl9Vtv5 rv09ps5tLxlwJ6ej9r8lHhz6RTE7qb7ARYlk/EeuVYyiRiuKDv1POYEIQPYPjK0QfyRx ZVd/BUND+4zRxbIu5FJPjeqJVgwUoV80z8GMrQaGEhauL7LtMfETIh+b/TpejMni7QUl aVDw== X-Forwarded-Encrypted: i=1; AJvYcCXFOG7KR9ehQa7r24oby4vyJJaIt+LfP2DzJsL+av7z/rsxV9kDwhe0O5WeAKoM0wjmtHMofO6ErfaykPEC@gnu.org X-Gm-Message-State: AOJu0YzAgK39Xy4JCZeI+VOmUki/sZ/GxBQIcSKNSPBFtfqWnxWbWtoB FpWjIpTGnkJXELrlBBdWetUH/qEIdtbMxygZjAPrLGoDuyawaRqgjV51xw== X-Google-Smtp-Source: AGHT+IGmZguYCFzSVtMxsBrIQEoIlI3M5Y52v2vpuxjQVrVbZE0vOOs/+QVUB3lTlY3M6Esssq2cEw== X-Received: by 2002:a05:6512:3d1b:b0:539:f9b9:e6d2 with SMTP id 2adb3069b0e04-53b348e73camr9176399e87.35.1730400915648; Thu, 31 Oct 2024 11:55:15 -0700 (PDT) Received: from barbar (mobile-access-d98cc9-211.dhcp.inet.fi. [217.140.201.211]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-53c7bcce691sm294023e87.156.2024.10.31.11.55.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Oct 2024 11:55:15 -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: <87msil77oi.fsf@localhost> (Ihor Radchenko's message of "Wed, 30 Oct 2024 18:43:41 +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> Date: Thu, 31 Oct 2024 20:55:11 +0200 Message-ID: <87ed3wnlv4.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.74 X-Spam-Score: -3.74 X-Migadu-Queue-Id: DEFE2860D3 X-Migadu-Scanner: mx13.migadu.com X-TUID: wv99ROgzWR6R Good ideas! (transient-define-prefix org-cite-basic-follow (citation &optional prefix) [:class transient-columns :setup-children org-cite-basic-follow--setup :pad-keys t] (interactive) (if (or org-cite-basic-follow-ask (eq prefix '(-4))) (transient-setup 'org-cite-basic-follow nil nil :scope (list citation prefix)) (org-cite-basic-goto citation prefix))) This works nicely! (defun org-cite-basic-follow--setup (_) (transient-parse-suffixes 'org-cite-basic-follow (cl-map 'vector (lambda (group) (cl-map 'vector (lambda (suffix-spec) (pcase suffix-spec ((and (pred stringp) label) label) (`(,key ,desc (,fn !citation !prefix)) (list key desc `(lambda () (interactive) (letrec ((scope (transient-scope)) (citation (car scope)) (prefix (cadr scope))) (,fn citation prefix))))) (`(,key ,desc ,fn ,transform) (list key desc `(lambda () (interactive) (apply ',fn ,transform)))) (`(,key ,desc ,suffix) (list key desc suffix)))) group)) org-cite-basic-follow-actions))) This too works really well! I think it would make sence to match (,fn !citation), (,fn !citation-key) and (,fn !citation-key !prefix), does this sound reasonable? Thanks again for taking the time to help me with this=3D) Cheers, Tor-bj=C3=B6rn