mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-09-29 19:37:52 +00:00
ol: Tiny refactoring
* lisp/ol.el (org-link-open): Improve docstring. Tiny refactoring.
This commit is contained in:
parent
e361c64043
commit
833753abcf
13
lisp/ol.el
13
lisp/ol.el
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue