瀏覽代碼

Fix wrong-type-argument error when opening id link

* lisp/org.el (org-open-at-point): Check if link is non-nil before
  matching it.

Reported-by: Daniel Clemente <n142857@gmail.com>
Nicolas Goaziou 11 年之前
父節點
當前提交
e186cc804b
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      lisp/org.el

+ 2 - 1
lisp/org.el

@@ -10543,7 +10543,8 @@ application the system uses for this file type."
 	   ((and (string= type "thisfile")
 		 (or (run-hook-with-args-until-success
 		      'org-open-link-functions path)
-		     (and (string-match "^id:" link)
+		     (and link
+			  (string-match "^id:" link)
 			  (or (featurep 'org-id) (require 'org-id))
 			  (progn
 			    (funcall (nth 1 (assoc "id" org-link-protocols))