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 | |
parent | Further tweaks in the toolchain (diff) |
Fix the link in the coqffi tutorial by adding a new class of url
-rw-r--r-- | scripts/init.el | 13 | ||||
-rw-r--r-- | site/posts/CoqffiEcho.org | 2 |
2 files changed, 14 insertions, 1 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)) diff --git a/site/posts/CoqffiEcho.org b/site/posts/CoqffiEcho.org index 8d48c48..17a2ca6 100644 --- a/site/posts/CoqffiEcho.org +++ b/site/posts/CoqffiEcho.org @@ -19,7 +19,7 @@ opam install coq-coqffi coq-simple-io #+END_SRC Besides, this article is a literate program, and you can download -[[/files/coqffi-tutorial.tar.gz][the resulting source tree]] if you +[[rel:/files/coqffi-tutorial.tar.gz][the resulting source tree]] if you want to try to read the source directly, or modify it to your taste. #+BEGIN_EXPORT html |