diff options
author | Thomas Letan <lthms@soap.coffee> | 2022-08-13 22:17:07 +0200 |
---|---|---|
committer | Thomas Letan <lthms@soap.coffee> | 2022-08-13 22:17:07 +0200 |
commit | a11a708c0018d33e85d966fd902a950c69cf6641 (patch) | |
tree | ad7f3ad846d4c830326ef52ec200a3fa8b4599c3 /scripts | |
parent | Further tweaks in the toolchain (diff) |
Fix the link in the coqffi tutorial by adding a new class of url
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/init.el | 13 |
1 files changed, 13 insertions, 0 deletions
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 "</span>" "" "" "")) +;; 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 "<a href=\"%s\">%s</a>" 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)) |