Hi Oleh,

One approach would be to use a parse-tree filter to change one kind of
link into another.  Something like the following (not tested):

,----
| (defun awe/change-info-links (tree backend _info)
|   (org-element-map tree 'link
|     (lambda (link)
|       (when (org-export-derived-backend-p backend 'html)
|         (let* ((target (org-element-property :path link))
|                (parts (split-string target "#")))
|           (org-element-put-property link :type "https")
|           (org-element-put-property
|            link :path
|            (format
|             "//www.gnu.org/software/emacs/manual/html_node/%s/%s.html"
|             (nth 0 parts)
|             (nth 1 parts)))))))
|   tree)
| (add-to-list 'org-export-filter-parse-tree-functions #'awe/change-info-links)
`----

This finds info links in the buffer, and converts them to http ones for
html export.

Exercises for the reader:
- Handle the case of info links with no “#”
- Link to manuals as http links in the document, and convert only the
  relevant http links to info links for info export.

Hope this helps,

-- 
Aaron Ecay

Reply via email to