From a11a708c0018d33e85d966fd902a950c69cf6641 Mon Sep 17 00:00:00 2001 From: Thomas Letan Date: Sat, 13 Aug 2022 22:17:07 +0200 Subject: Fix the link in the coqffi tutorial by adding a new class of url --- scripts/init.el | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'scripts') diff --git a/scripts/init.el b/scripts/init.el index 0e21075..6c63344 100644 --- a/scripts/init.el +++ b/scripts/init.el @@ -70,6 +70,19 @@ (add-to-list 'org-entities-user '("mi" "\\)" nil "" "" "" "")) +;; Borrowed from Stack Exchange +;; https://emacs.stackexchange.com/questions/9807/org-mode-dont-change-relative-urls +(defun export-rel-url (path desc format) + (cl-case format + (html (format "%s" path (or desc path))) + (latex (format "\\href{%s}{%s}" path (or desc path))) + (otherwise path))) + +(eval-after-load "org" + '(org-link-set-parameters "rel" :follow #'browse-url :export #'export-rel-url)) +;; -- + + (defun with-keyword (keyword k) "Look-up for keyword KEYWORD, and call continuation K with its value." (pcase (org-collect-keywords `(,keyword)) -- cgit v1.2.3