From 151da3ae7a495d46f9a14f130e4e2022cecb9fe1 Mon Sep 17 00:00:00 2001 From: Galen Menzel Date: Wed, 9 Aug 2017 11:57:38 -0700 Subject: [PATCH] org.el: Fix org-open-at-point for tags. lisp/org.el (org-open-at-point): Move case for tags up so that it's not shortcutted by the case for no valid context. TINYCHANGE --- lisp/org.el | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 2d98ba814..52460d8f6 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -10633,6 +10633,14 @@ a timestamp or a link." (org-open-at-point)) (require 'org-attach) (org-attach-reveal 'if-exists)))) + ;; On tags within a headline or an inlinetask. + ((and (memq type '(headline inlinetask)) + (let ((case-fold-search nil)) + (save-excursion (beginning-of-line) + (looking-at org-complex-heading-regexp)) + (and (match-beginning 5) + (>= (point) (match-beginning 5))))) + (org-tags-view arg (substring (match-string 5) 0 -1))) ;; On a footnote reference or at definition's label. ((or (eq type 'footnote-reference) (and (eq type 'footnote-definition) @@ -10668,14 +10676,6 @@ a timestamp or a link." (point))) (user-error "No link found")) ((eq type 'timestamp) (org-follow-timestamp-link)) - ;; On tags within a headline or an inlinetask. - ((and (memq type '(headline inlinetask)) - (let ((case-fold-search nil)) - (save-excursion (beginning-of-line) - (looking-at org-complex-heading-regexp)) - (and (match-beginning 5) - (>= (point) (match-beginning 5))))) - (org-tags-view arg (substring (match-string 5) 0 -1))) ((eq type 'link) (let ((type (org-element-property :type context)) (path (org-link-unescape (org-element-property :path context)))) -- 2.14.0