u/tonyaldonin r/emacs • Recommends
…oom E11: Org Mode - Custom Link Types] Zaist describes how to add a new link type using `org-add-link-type`. Note that `org-add-link-type` is obsolete since org-mode `9.0` but still supported.
Since `9.0` we use `org-link-set-parameters` to add the links:
;; from the video
(defun make-youtube-link (youtube_id)
(browse-url (concat "link to this video youtube_id)))
(org-add-link-type "yt" #'make-youtube-link) ; obsolete since 9.0
;; since 9.0
(org-link-set-parameters "yt" :follow #'make-youtube-link)
This allows us to open the following link `[yt:Febe4lUK5G4]` in the browser with `org-open-at-point` (bound to `C-c C-o` by default).
In [Emacs Doom E12: Org Mode -…