On 07/11/2023 16:30, Ihor Radchenko wrote:
Max Nikulin writes:
What about passing an extra argument to :export function in
`org-export-custom-protocol-maybe':
(funcall protocol path desc backend info *link-object*)
It would require another iteration with `condition-case' to deal with
functions having old signature.
Earlier you considered :filter property that receives link object
instead of path and desc pair. I am unsure concerning name, but I like
that idea.
Then, if the :export function returns non-string, the return value is
further processed as (org-export-data *return-value* info).
Do you mean something like the following?
(defun org-man-export (link description backend)
"Export a man page LINK with DESCRIPTION.
BACKEND is the current export backend."
(org-element-create-link
(format "http://man.he.net/?topic=%s§ion=all" link)
description))
where org-element-create-link parses link target into :type, :raw-link,
etc. properties.