diff --git a/lisp/ol.el b/lisp/ol.el index 20aab6bb8..3808b9215 100644 --- a/lisp/ol.el +++ b/lisp/ol.el @@ -1097,12 +1097,15 @@ (defun org-link-open (link &optional arg) ;; first need to integrate search option, if any. ("file" (let* ((option (org-element-property :search-option link)) - (path (if option (concat path "::" option) path))) - (org-link-open-as-file path - (pcase (org-element-property :application link) - ((guard arg) arg) - ("emacs" 'emacs) - ("sys" 'system))))) + (path (if option (concat path "::" option) path)) + (f (org-link-get-parameter org-current-uri-scheme :follow))) + (if (functionp f) + (funcall f path) + (org-link-open-as-file path + (pcase (org-element-property :application link) + ((guard arg) arg) + ("emacs" 'emacs) + ("sys" 'system)))))) ;; Internal links. ((or "coderef" "custom-id" "fuzzy" "radio") (unless (run-hook-with-args-until-success 'org-open-link-functions path)