From 6e848b0e601c9a28300b00aafcef8f2efda973f4 Mon Sep 17 00:00:00 2001 From: Oleh Krehel Date: Thu, 27 Feb 2014 14:23:35 +0100 Subject: [PATCH] lisp/org.el (org-open-at-point): prioritize link * lisp/org.el (org-open-at-point): Check the parent of `context'. If it's a link, set `context' to its parent. Makes sure links with verbatim descriptions are treated as links and not verbatim. --- lisp/org.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/org.el b/lisp/org.el index 3800d80..92211a8 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -10460,6 +10460,8 @@ is used internally by `org-open-link-from-string'." (setq org-window-config-before-follow-link (current-window-configuration)) (org-remove-occur-highlights nil nil t) (let* ((context (org-element-context)) + (parent (plist-get (cadr context) :parent)) + (context (if (eq (car parent) 'link) parent context)) (type (org-element-type context))) (cond ;; On a headline or an inlinetask, but not on a timestamp, -- 1.8.4