diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2017-01-11 12:30:07 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2017-01-11 12:31:53 +0100 |
commit | bd3eb745097475f1e802a256ab384afb56e57c7b (patch) | |
tree | 20aa4bed510658b7b681ed1cb3eca7ceb50ad658 | |
parent | 9f96208eec2964121c1b5f5d4b23e1bee8cede3a (diff) | |
download | org-mode-bd3eb745097475f1e802a256ab384afb56e57c7b.tar.gz |
Remove unnecessary workaround
* lisp/org.el (org-open-at-point): Links can no longer be nested.
Remove workaround.
-rw-r--r-- | lisp/org.el | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/lisp/org.el b/lisp/org.el index cf15812..6c3642d 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -10821,13 +10821,8 @@ link in a property drawer line." (>= (point) (match-beginning 5))))) (org-tags-view arg (substring (match-string 5) 0 -1))) ((eq type 'link) - ;; When link is located within the description of another - ;; link (e.g., an inline image), always open the parent - ;; link. - (let* ((link (let ((up (org-element-property :parent context))) - (if (eq (org-element-type up) 'link) up context))) - (type (org-element-property :type link)) - (path (org-link-unescape (org-element-property :path link)))) + (let ((type (org-element-property :type context)) + (path (org-link-unescape (org-element-property :path context)))) ;; Switch back to REFERENCE-BUFFER needed when called in ;; a temporary buffer through `org-open-link-from-string'. (with-current-buffer (or reference-buffer (current-buffer)) @@ -10842,8 +10837,8 @@ link in a property drawer line." ;; ("open" function called with a single argument). ;; If no such function is found, fallback to ;; `org-open-file'. - (let* ((option (org-element-property :search-option link)) - (app (org-element-property :application link)) + (let* ((option (org-element-property :search-option context)) + (app (org-element-property :application context)) (dedicated-function (org-link-get-parameter (if app (concat type "+" app) type) @@ -10874,15 +10869,15 @@ link in a property drawer line." (org-with-wide-buffer (if (equal type "radio") (org-search-radio-target - (org-element-property :path link)) + (org-element-property :path context)) (org-link-search (if (member type '("custom-id" "coderef")) - (org-element-property :raw-link link) + (org-element-property :raw-link context) path) ;; Prevent fuzzy links from matching ;; themselves. (and (equal type "fuzzy") - (+ 2 (org-element-property :begin link))))) + (+ 2 (org-element-property :begin context))))) (point)))) (unless (and (<= (point-min) destination) (>= (point-max) destination)) |