From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id gG12LTvtI2ccOgAA62LTzQ:P1 (envelope-from ) for ; Thu, 31 Oct 2024 20:48:59 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id gG12LTvtI2ccOgAA62LTzQ (envelope-from ) for ; Thu, 31 Oct 2024 21:48:59 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=EdL07fZf; dmarc=pass (policy=none) header.from=gmail.com; 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=1730407739; a=rsa-sha256; cv=none; b=Vzy4Grt6U5o+y7eRepUjoIg2zRM+zdxJsc0LW4d2gSE40OcBdW6tjKaS+5E3krmrZkbu9K igPNYaBvvMRwkn1DsZiXasC9qCQtLNes9FjZ3+ygq3oaBd7tlG2j9O9frpgDHxf7IQlL63 7L/XIdOE5XGG05BXTjQlmAnuErrw2treR9BCXgxA91LyStTGYTkOAL27cOXEe5JDTOzZfG uszWQA1YBA20VEj9Wa/Yzc3p+ePNrExQCu7DHBouSmUMq97VoebOS+6XztB0pkQBCbdXBD Tiy1VqfiKEwAa6mS2DSz7YOmPsU8umcYaoY9m8RIipuoLCcuB3LUHFs7+bII8A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=EdL07fZf; dmarc=pass (policy=none) header.from=gmail.com; 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=1730407739; 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=t44COTKqmYHYX3/t7LfT4TvO7VgyX87I2JTT4FYdZHU=; b=O3y3/FOWCNiSEwa/5/WKQFDs4V9JmpJWjT4wmNpkAIGfGj6Zrn3+WnoVHxB7b0H2+zua// ZcWzvM77I3aZ1TwbU+Qc9ar7V5DnxvQ6B/DYAHsWlRN+CtSyTsj/tia5eC+zb0JNdzUT4I l1JogKK0RPTFqiCx/rJ8hJE5K/vXLiStKhpjvg7Xzv3NPlIjTN8g3Nwk3BckyKqxXBBYMx UIdn6W3DEQGyKyZuDxUcnuPw65qjbANp8mkeZI1KRSvAVleP/Ibo6Y2WboOodVC7+C0V6i MFfQbJdcqCb7Sx6ELycwBF/61ioCSyTv353vD8+sS4xJC1ewU+oZuU0JEw8Hew== 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 4C11B744C for ; Thu, 31 Oct 2024 21:48:59 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t6c5U-0001Nt-Ga; Thu, 31 Oct 2024 16:48:12 -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 1t6c5S-0001NM-FL for emacs-orgmode@gnu.org; Thu, 31 Oct 2024 16:48:10 -0400 Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t6c5N-0003SB-8T for emacs-orgmode@gnu.org; Thu, 31 Oct 2024 16:48:10 -0400 Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-539f4d8ef66so1811007e87.1 for ; Thu, 31 Oct 2024 13:48:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730407682; x=1731012482; 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=t44COTKqmYHYX3/t7LfT4TvO7VgyX87I2JTT4FYdZHU=; b=EdL07fZfo6m5e/BJRqVuwYhX4FQ4mBjIwdXTNHqLD/7c5f8kL3OWPx104PrU8i5gML xipXAB5YkCnfiLQHCBrpyg4WL4QAfn+aoLWqZRoyy2PKS3TOhNSAoOs7UNgaRgCSKFWt HKG8uZ+dW7IlmnFvEx7YX0vcm4FHTs1p7sv6TZUwS4XRZKmVHcZfBNtfGoYc/NRa+Ltj lDq8fh9fxtprQcJpyaKbd9VY+embn3X2uG7vzGhLQZVUC6bTD+N6rDqRpXT1afUAy+vi LCfCc7KAp477g0gzLAeC1quPd6AB7jUXgUBmxdzv3IDuaU4FUz5+uOImW5jmfQxaePqT 6lrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730407682; x=1731012482; 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=t44COTKqmYHYX3/t7LfT4TvO7VgyX87I2JTT4FYdZHU=; b=WoTjBuB2omk6tUAfWvgRHqG/07nrTl+BsMIJzYD3UUR5jZxt0h73xVsDjgITB35RYC Q1dIt+l1IwbqG2KDoOYymghlpcNoVCYX4QcZRvUSmADO8henisIX6Uw1qXXDQ79zAUfC YYENfSiN3w2ZwzsagVWxyUmvaiJJdOPkHgBDWY1/uTK8woQkRHdKBcEPZllNg/n8KeLt WDvQR2FeRbRF0PWwLnIgW1o4e1tOby+i+cNsyzjEUNJf2EeuxHRDFMRKE71J0svUAuSg 1xdA6K4idYmlN526MTy5o4/nIBWa9SO6aIsm9h5NCqXpkuHAUNdZeW+Ay2poCKDVgo+j pf4A== X-Forwarded-Encrypted: i=1; AJvYcCXBvjJk8jaKoR9rKPGO/IZVP/7erDLeiOk0S+UZmGJWNVIFPlg6cYqbRCf5KhbbAGDB+fg+mvCJVhBM4EBt@gnu.org X-Gm-Message-State: AOJu0YzBd5S6Ityd55eHEP4GW8YX5cah5f8ruCKOuMvejLHgZMfAVqVR HZD9BifkNvOa5VYTkzbHez1xzZCS4iiEBd9XipEZca80ABF8tiYsOR8MqA== X-Google-Smtp-Source: AGHT+IElUTQuOXQsyLBiVnu4g3hL7YXqiqvlO47b2CTsaoWMKk4LrJZ3x9G/PmJevIAKTJodURWTXw== X-Received: by 2002:ac2:4e08:0:b0:539:e94d:b490 with SMTP id 2adb3069b0e04-53b34c5f8e4mr10156411e87.43.1730407682179; Thu, 31 Oct 2024 13:48:02 -0700 (PDT) Received: from barbar (mobile-access-d98cc9-211.dhcp.inet.fi. [217.140.201.211]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-53c7bc9c070sm322702e87.84.2024.10.31.13.47.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Oct 2024 13:48:01 -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: <874j4sccuv.fsf@localhost> (Ihor Radchenko's message of "Thu, 31 Oct 2024 19:05:12 +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> Date: Thu, 31 Oct 2024 22:47:53 +0200 Message-ID: <87jzdo2e4m.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::12f; envelope-from=tclaesson@gmail.com; helo=mail-lf1-x12f.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: -0.50 X-Spam-Score: -0.50 X-Migadu-Queue-Id: 4C11B744C X-Migadu-Scanner: mx12.migadu.com X-TUID: wOoiQa/SwoGo Thanks! Here is another take=3D) (defcustom org-cite-basic-follow-actions '[["Open" ("b" "bibliography entry" (org-cite-basic-goto !citation !prefix))]=20= =20=20=20 ["Copy" ("d" "DOI" org-cite-basic-follow.copy-doi)] ["Browse" ("u" "url" org-cite-basic-follow.browse-url)]] "Hepp" :group 'org-cite :type 'sexp) (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))) (defun org-cite-basic-follow--parse-suffix-specification (specification) (pcase specification ((and (pred stringp) label) label) (`(,key ,desc (,fn . ,fn-args) . ,other) (let ((function-args (mapcar (lambda (arg) (pcase arg ('!citation '(car (transient-scope))) ('!prefix '(cadr (transient-scope))) ('!citation-key '(org-element-property :key (car (transient-scope)))))) fn-args))) `(,key ,desc (lambda () (interactive) (,fn ,@function-args)) ,other))) (`(,key ,desc ,suffix) (list key desc suffix)))) (defun org-cite-basic-follow--setup (_) (transient-parse-suffixes 'org-cite-basic-follow (cl-map 'vector (lambda (group) (cl-map 'vector #'org-cite-basic-follow--parse-suffix-specification group)) org-cite-basic-follow-actions))) Cheers, Tor-bj=C3=B6rn