On Sun, Feb 4, 2018 at 11:31 AM Nicolas Goaziou <m...@nicolasgoaziou.fr>

> Note that you cannot simply copy "http" or "https" types. As default
> type links, they are hard-coded in every export back-end. It means they
> do not have to set any :export property.
> As a user, if you want to export a "gopher" link type, you need to
> implement a function exporting it, and register it as the :export value.

Thank you.

This works.

(defun org-link-gopher-export-link (link desc format)
  "Create export version of LINK and DESC to FORMAT."
  (let ((link (concat "gopher:" link)))
     ((eq format 'html)
      (format "<a href=\"%s\">%s</a>" link desc))
     ((eq format 'latex)
      (format "\\href{%s}{%s}" link desc))
     (t                               ;`ascii', `md', `hugo', etc.
      (format "[%s](%s)" desc link)))))
(org-link-set-parameters "gopher" :export #'org-link-gopher-export-link)

Kaushal Modi

Reply via email to