diff options
author | Nicolas Goaziou <n.goaziou@gmail.com> | 2014-05-26 18:13:45 +0200 |
---|---|---|
committer | Nicolas Goaziou <n.goaziou@gmail.com> | 2014-05-26 18:17:35 +0200 |
commit | 0e303ab5774d6846f5b6a6623bd614d2f4d4ab97 (patch) | |
tree | b744b1c67c496908f6b838f31dfe56e3d69fef1a | |
parent | f574744aee1d202608c14e2c67f93aefbc077b4b (diff) | |
download | org-mode-0e303ab5774d6846f5b6a6623bd614d2f4d4ab97.tar.gz |
Small fix
* lisp/org.el (org-open-at-point): Use parser instead of
`org-at-comment-p' and `org-at-property-p', which are not accurate.
-rw-r--r-- | lisp/org.el | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/org.el b/lisp/org.el index 4ef9146..e62d043 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -10606,17 +10606,18 @@ is used internally by `org-open-link-from-string'." ;; On an unsupported type, check if point is contained within ;; a support one. (while (and (not (memq (setq type (org-element-type context)) - '(headline inlinetask link footnote-definition - footnote-reference timestamp))) + '(comment headline inlinetask link + footnote-definition footnote-reference + node-property timestamp))) (setq context (org-element-property :parent context)))) (cond + ;; Blank lines at the beginning of buffer: bail out. + ((not context) (user-error "No link found")) ;; WARNING: Before checking for syntactically correct ;; contexts, we make two exceptions as we open links in ;; comments and properties. - ((or (org-at-comment-p) (org-at-property-p)) + ((memq type '(comment node-property)) (org-open-link-in-comment-or-property)) - ;; Now check for context where link opening is not supported. - ((not context) (user-error "No link found")) ;; On a headline or an inlinetask, but not on a timestamp, ;; a link, a footnote reference or on tags. ((and (memq type '(headline inlinetask)) |