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 uEQKHNBz6WY9wAAA62LTzQ:P1 (envelope-from ) for ; Tue, 17 Sep 2024 12:19:28 +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 uEQKHNBz6WY9wAAA62LTzQ (envelope-from ) for ; Tue, 17 Sep 2024 14:19:28 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="En/Fn7hb"; 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=1726575568; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=EBgFKzqBrPqLL3R3yhr5tdau28HipcosPgMa+R/u7o4=; b=KdHPqeJtGeXcdLvuu5Rk/nQ2vdT5S6+NqMBMyjbPp7dzVoHRuqIlWDlap1/UdCdxfxCbLF 7bJkxWrtAl/QTP6ylGB/vhYNq/MFvCCQIiIZgU/as7KgfOFwZmsexuPfne0uNA8qncG0W4 vUZjv5zCn26Kkklm8G29dfo0ThnrDwYke9lqypflOUJPKtuiLML3M3/Zx4W0fpsFjovqPJ Iq63rYg7j/JNEA7zUaZuAUzVhlDPNodPw58gDuS2+wKQvb0xFxIvHxVCJJRqldSMUDU/yC YctzNUL/MzLvHsIq4kkdzS2XCklDcwxJXM2dPfdrfsGVywP+5RvrG7U8LSv8lg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="En/Fn7hb"; 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-Seal: i=1; s=key1; d=yhetil.org; t=1726575568; a=rsa-sha256; cv=none; b=tvSBNTSyde7oCYeBBEWH4R8plVB8z+ypGkjqC95DiPnbJO/ZsKZUopgQBgJAJbYf8WzifG 2yvOHpC0Z7xnzMdKPOwi2aKSIpZIo2NXiVMAnO8JhKWwpQhXDSXzLGFmIMBvnLcrS5wB++ PyMhYAJEcyJhtLzuROq1KdWsURcsx9gAGCg5M1hTmDAOXX8BPJQkJeCCBqi/1Kfoz9mNFd aYqjrLSCRK2eCWgE0Vk6AigyaVmjC36/cgsx5+Av0Zifkn7DtxMbmJmMKMiq9tjWxAhjT4 93gqwZ0S6xn1O6+dGlOo+sd6AspI5qw9cyjjHATUCSSwoqLZpMouQravTr34tQ== 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 0C5661184 for ; Tue, 17 Sep 2024 14:19:28 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sqXA0-0001Yk-4G; Tue, 17 Sep 2024 08:18:24 -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 1sqX9t-0001Y4-7Z for emacs-orgmode@gnu.org; Tue, 17 Sep 2024 08:18:17 -0400 Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sqX9r-0007Ko-38 for emacs-orgmode@gnu.org; Tue, 17 Sep 2024 08:18:16 -0400 Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-2f7ba97ebaaso269801fa.2 for ; Tue, 17 Sep 2024 05:18:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726575490; x=1727180290; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=EBgFKzqBrPqLL3R3yhr5tdau28HipcosPgMa+R/u7o4=; b=En/Fn7hbQm7DuqCoaGRm83gfY+Sol/Y2hUlukaOXZMKPz7KBj/Ow+BEkQNuLqvmhco Afq5QeHzbJznH96E2tvJeL484AVDXdV+76TpzuLfop3E5h8SjXkw8uA/5Qqxh3SL2M27 RI3yFFl/t83M+LfEbQE/BV3VtxXaBYh9W1InkUyGKB3Nrio2FOxGkeSis9lieUvT4JKx n8M33TdO8kVfBP4To/SUwbWBYzcsUowH2bHlRyjcwtCMSn79RAOc46V5X9gS2sOoGHxk 8b/5+JnTWctIi8KKdmChg1wBnM6PXUDtQt8tJ7Sl4sqFse75y8rDm6qlM98QaKi1hVkk APHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726575490; x=1727180290; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:to:from:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=EBgFKzqBrPqLL3R3yhr5tdau28HipcosPgMa+R/u7o4=; b=jcwJkd7D6MSJVIrx3FVMqS7reus4xUTob/ZJzKKpoe/MXVL2fMLqoLcuj/3pzLy/pq J1J9mki4KwJZbfirHTzi02h2I4F14Qg4KvnIfOonCB4TMRcADIxX/iI0x/5XsjQD/ND7 zHjDRST0ZDdO9C7egnAezqn3svW6Omkaqaxdrl+RNcrrXxPVq7tqggjfCouCv08lM83B v2QNNZkeMcBtjj7PGMNFYieT3q/xMpIm1e9FvsJGvyTi/3QjrSTcFZzWmYv4Xp3eO0b1 b96U1fto4SWUleqXq9bnG4P4ZfdSf8hUipqPNcuWrIinoRN4PjRM52g3aLtmQPe5vbjJ 5Wbw== X-Forwarded-Encrypted: i=1; AJvYcCW3DvVldJgUQ1qwoU5WvIbrFTgGpSfpy8pV9xfxW5p+W66GxJKGr5tmSI8urzrJLjFGBFn87EJYGszGkpKK@gnu.org X-Gm-Message-State: AOJu0YzTWOQMsgfV651ApF0yQQ8FnXnISp0dBYSo32T9VwOKfGhHXJos wXOLwVorjBmd4RcFSwkno9KD7kNlnq6Mo721GGHoOwN9BghixiVk/PnaHQ== X-Google-Smtp-Source: AGHT+IFol+jUFs9oGncXS2F2YzXNwie4gOL3Bq5gc9cG5EyU4rxjoIRrAba1Dw1cnx7MYU3HQEdq0A== X-Received: by 2002:a05:6512:1581:b0:536:554a:b9c8 with SMTP id 2adb3069b0e04-53678ff49c2mr10413659e87.54.1726575489168; Tue, 17 Sep 2024 05:18:09 -0700 (PDT) Received: from barbar ([193.64.204.56]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-536870965ecsm1203178e87.128.2024.09.17.05.18.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Sep 2024 05:18:08 -0700 (PDT) From: =?utf-8?Q?Tor-bj=C3=B6rn_Claesson?= To: Ihor Radchenko , emacs-orgmode@gnu.org Subject: Re: Org-cite: Replace basic follow-processor with transient menu? In-Reply-To: <874j6h3rw8.fsf@localhost> (Ihor Radchenko's message of "Sun, 15 Sep 2024 14:36:55 +0000") References: <8734m28l9a.fsf@gmail.com> <874j6h3rw8.fsf@localhost> Date: Tue, 17 Sep 2024 15:18:05 +0300 Message-ID: <877cbamq2q.fsf@gmail.com> 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::22e; envelope-from=tclaesson@gmail.com; helo=mail-lj1-x22e.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: -4.61 X-Spam-Score: -4.61 X-Migadu-Queue-Id: 0C5661184 X-Migadu-Scanner: mx10.migadu.com X-TUID: tYKzBT9rolEt Hi and thanks for replying! Ihor Radchenko writes: > > I do think that having extended menus for org-open-at-point could be > useful. Not by default, but, for example, with a prefix argument. > This is a good point, but of much larger scope than just replacing the follower of the basic citation-processor. > > Your example demonstrates the following options: > 1. Plain old opening bibtex entry > 2. Copying citation key > 3. Opening DOI-derived link in browser > 4. Opening PDF (but I am not sure how you want to find the PDF name from > bibtex record) > > I am not sure how useful is copying the citation key, but various extra > menus like opening DOI/ISBN/URL links might be of use. > PDFs might be useful, but it is not clear how to know where such PDF is > located for arbitrary user. > > Any other suggestions? > Maybe from > https://github.com/jkitchin/org-ref/blob/fd178abf12a85f8e12005d1df683564b= dc534124/org-ref-citation-links.el#L525 ? Notes and PDF depends heavily on user preferences - and should maybe be left out for now? org-ref allows customizing org-ref-open-pdf-function, with a default one using bibtex-completion-find-pdf, which finds a pdf in bibtex-completion-library-path called citekey with one of the extension listed in bibtex-completion-pdf-extension. Maybe it is a good idea to start small, for example provide 1. Open bibtex-entry 2. Copy DOI 3. Opening DOI/ISBN/URL links in browser Further functionality can easily be added per user, and good solutions incorporated by default in the future? I have played some more with this - would it be a good idea to include macros to get citekey, datum and _? I would be happy to clean this up a bit, add DOI/ISBN/URL-functionality, documentation and prepare a bug report= /patch. (defmacro org-cite-basic-follow--citekey () '(org-element-property :key (car (oref (transient-prefix-object) scope)))) (defmacro org-cite-basic-follow--datum () '(car (oref (transient-prefix-object) scope))) (defmacro org-cite-basic-follow--_ () '(cadr (oref (transient-prefix-object) scope))) (transient-define-prefix org-cite-basic-follow (datum _) "How should we follow references?" [["Open" ("b" "bibliography entry" (lambda () (interactive) (org-cite-basic-goto (org-cite-basic-follow--datum) (org-cite-basic-follow--_))))] ["Copy" ("d" "DOI" (lambda () (interactive) (kill-new (save-excursion (with-temp-buffer (mapc #'insert-file-contents org-cite-global-bibliography) (bibtex-set-dialect (parsebib-find-bibtex-dialect) t) (bibtex-search-entry (org-cite-basic-follow--citekey)) (setq doi (bibtex-autokey-get-field "doi")) (replace-regexp-in-string "^http://dx.doi.org/" "" doi))))))]] (interactive) (transient-setup 'org-cite-basic-follow nil nil :scope (list=20 datum _))) Best regards, Tor-bj=C3=B6rn Claesson