diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2020-02-15 18:34:16 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2020-02-15 18:34:16 +0100 |
commit | 833753abcfbdec86586889693c4ed9216aef8078 (patch) | |
tree | 5aaee83e326240af702dd1f4d43b1fdb2c18ee94 | |
parent | e361c640435af947fab201c1fe60f25843edb5e9 (diff) | |
download | org-mode-833753abcfbdec86586889693c4ed9216aef8078.tar.gz |
ol: Tiny refactoring
* lisp/ol.el (org-link-open): Improve docstring. Tiny refactoring.
-rw-r--r-- | lisp/ol.el | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -928,8 +928,14 @@ Abbreviations are defined in `org-link-abbrev-alist'." (defun org-link-open (link &optional arg) "Open a link object LINK. -Optional argument is passed to `org-open-file' when S is -a \"file\" link." + +ARG is an optional prefix argument. Some link types may handle +it. For example, it determines what application to run when +opening a \"file\" link. + +Function responsible for opening the link are either hard-coded +for internal and \"file\" links, or stored as a parameter in +`org-link-parameters', which see." (let ((type (org-element-property :type link)) (path (org-element-property :path link))) (cond @@ -971,8 +977,7 @@ a \"file\" link." (let ((destination (org-with-wide-buffer (if (equal type "radio") - (org-link--search-radio-target - (org-element-property :path link)) + (org-link--search-radio-target path) (org-link-search (pcase type ("custom-id" (concat "#" path)) |