[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fwd: Org-cite: Replace basic follow-processor with transient menu?
From: |
Ihor Radchenko |
Subject: |
Re: Fwd: Org-cite: Replace basic follow-processor with transient menu? |
Date: |
Tue, 10 Dec 2024 19:11:36 +0000 |
Tor-björn Claesson <tclaesson@gmail.com> writes:
>> 1. Ideally, we want at least one more menu entry here. Otherwise, the
>> menu is not very useful.
> ...
> 1. The infrastructure is very useful in itself, but I have added an
> option to add the DOI to the kill ring, it seems innocent enough. I had
> first thought that I would like to, as a next step, add a helper
> function to try really hard to get a citation key from a citation, but
> lets go with this.
Thanks!
> +(defcustom org-cite-basic-follow-actions
> + '[["Open"
> + ("b" "bibliography entry" (org-cite-basic-goto !citation !prefix))]
> + ["Copy"
> + ("d" "DOI"
> + (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-element-property :key !citation))
> + (setq doi (bibtex-autokey-get-field "doi"))
> + (replace-regexp-in-string "^http://dx.doi.org/" "" doi)))))]]
> + "Actions in the `org-cite-basic-follow' transient menu.
Two comments here:
1. It should not be a lambda. Better have a function or even command
2. The logic is not right. You should better follow
`org-cite-basic--key-completion-table':
`org-cite-basic--parse-bibliography', `org-cite-basic--get-entry',
and `org-cite-basic--get-field'.
--
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
- Re: Fwd: Org-cite: Replace basic follow-processor with transient menu?,
Ihor Radchenko <=
- Re: Fwd: Org-cite: Replace basic follow-processor with transient menu?, Tor-björn Claesson, 2024/12/11
- Re: Fwd: Org-cite: Replace basic follow-processor with transient menu?, Tor-björn Claesson, 2024/12/11
- [RFC] The best way to choose an "action" at point: context-menu-mode, transient, which-key or embark? (was: Fwd: Org-cite: Replace basic follow-processor with transient menu?), Ihor Radchenko, 2024/12/13
- Re: [RFC] The best way to choose an "action" at point: context-menu-mode, transient, which-key or embark?, Gabriel Santos, 2024/12/14
- Re: [RFC] The best way to choose an "action" at point: context-menu-mode, transient, which-key or embark?, Ihor Radchenko, 2024/12/14
- Re: [RFC] The best way to choose an "action" at point: context-menu-mode, transient, which-key or embark?, Gabriel Santos, 2024/12/14
- Re: [RFC] The best way to choose an "action" at point: context-menu-mode, transient, which-key or embark?, Ihor Radchenko, 2024/12/14
- Re: [RFC] The best way to choose an "action" at point: context-menu-mode, transient, which-key or embark?, Suhail Singh, 2024/12/14
- Re: [RFC] The best way to choose an "action" at point: context-menu-mode, transient, which-key or embark?, Ihor Radchenko, 2024/12/14
- Re: [RFC] The best way to choose an "action" at point: context-menu-mode, transient, which-key or embark?, Suhail Singh, 2024/12/14