On 08/10/2023 16:48, Ihor Radchenko wrote:
+++ b/lisp/ol.el
@@ -1377,7 +1377,29 @@ (defun org-link--open-elisp (path _)
(call-interactively (read path))))
(user-error "Abort")))
-(org-link-set-parameters "elisp" :follow #'org-link--open-elisp)
+(defun org-link--export-code (path description _ info &optional lang)
+ "Export executable link with PATH and DESCRIPTION.
+INFO is the current export info plist.
+LANG is the language name, as in #+begin_src lang. For example, \"elisp\"
+or \"shell\"."
+ (concat
+ (org-export-data
+ (org-element-create
+ 'inline-src-block
+ `( :language ,lang
+ :value ,path
+ :parameters ":exports code :noweb no :eval never"))
+ info)
I think, the fragment above should be a public function that is a
building block for users who want to override export of links having
descriptions.
+ (when description (format " (%s)" description))))
I hope, path was never added as default description, so checks (or
(string-equal path description) (string-equal (concat type ":" path)
description))) are not necessary to avoid annoying repetitions.