Thank you for taking the time to look at this! Ihor Radchenko writes: >> +(defcustom org-cite-basic-follow-actions >> + '[["Open" >> + ("b" "bibliography entry" (org-cite-basic-goto !citation !prefix))]] >> + "Actions in the `org-cite-basic-follow' transient menu. >> + >> +This option uses the same syntax as `transient-define-prefix', see Info node >> +`(transient)Binding Suffix and Infix Commands'. In addition, it is possible >> +to specify a function call for the COMMAND part, where !citation and >> +!prefix can be used to access those values." >> + :group 'org-cite >> + :package-version '(Org . "9.8") >> + :type 'sexp) > > 1. Ideally, we want at least one more menu entry here. Otherwise, the > menu is not very useful. > 2. It would be nice to provide some examples on using !citation and > !prefix in the docstring. Also, lambdas. > 3. We need to explain what !citation and !prefix refer to. 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. 2 and 3. I tried to describe this in the new version of the patch. >> +(defun org-cite-basic-follow--parse-suffix-specification (specification) >> + "Handle special syntax for `org-cite-basic-follow-actions'." >> + (pcase specification >> + (`(,key ,desc (lambda ,args . ,fn-args) . ,other) >> + `(,key ,desc >> + (lambda ,args >> + ,(unless (and (listp (car fn-args)) >> + (equal (caar fn-args) >> + 'interactive)) >> + '(interactive)) >> + (let ((!citation (car (transient-scope))) >> + (!prefix (cadr (transient-scope)))) > > This can be improved a bit. > Rather than storing transient scope as (list citation prefix), we can > use plist: (list :citation citation :prefix prefix). Then, we can do > (let ((!citation (plist-get (transient-scope) :citation)) > (!prefix (plist-get (transient-scope) :prefix))) ...) > > It will be more readable. Neat! Thanks! Please find attached version 4 of the patch. Cheers, Tor-björn