Explorar o código

Fix `org-open-at-point' in comments

* lisp/org.el (org-open-at-point): Return an error in comments, as
  there are no link to be found.
Nicolas Goaziou %!s(int64=11) %!d(string=hai) anos
pai
achega
3917776995
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      lisp/org.el

+ 1 - 0
lisp/org.el

@@ -10480,6 +10480,7 @@ is used internally by `org-open-link-from-string'."
 					  footnote-reference timestamp)))
 		    (setq context (org-element-property :parent context))))
 	(cond
+	 ((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))