From 9058a3d9d39cd80560a5c9d609c7cf19cce9c64b Mon Sep 17 00:00:00 2001 From: Thomas Dehaeze Date: Wed, 25 Nov 2020 12:19:59 +0100 Subject: [PATCH] Add yt link => works for html and markdown --- doom.org | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/doom.org b/doom.org index f1510bb..76a6c23 100644 --- a/doom.org +++ b/doom.org @@ -1511,6 +1511,33 @@ https://www.reddit.com/r/emacs/comments/d3a8or/pretty_org_tables_in_the_buffer_c ) #+end_src +** Org Links +*** Youtube Links +#+begin_src emacs-lisp + (setq yt-iframe-format + ;; You may want to change your width and height. + (concat "")) + + (org-add-link-type + "yt" + (lambda (handle) + (browse-url + (concat "https://www.youtube.com/embed/" + handle))) + (lambda (path desc backend) + (cl-case backend + (html (format yt-iframe-format + path (or desc ""))) + (md (format "{{< youtube %s >}}" + path)) + (latex (format "\href{%s}{%s}" + path (or desc "video")))))) +#+end_src + ** Org Gcal - https://cestlaz.github.io/posts/using-emacs-26-gcal/#.WIqBud9vGAk