Browse Source

Merge branch 'maint'

Nicolas Goaziou 1 month ago
parent
commit
83fb091a62
2 changed files with 8 additions and 4 deletions
  1. 5 4
      lisp/org-lint.el
  2. 3 0
      testing/lisp/test-org-lint.el

+ 5 - 4
lisp/org-lint.el

@@ -580,12 +580,13 @@ Use :header-args: instead"
     (lambda (k)
       (when (equal (org-element-property :key k) "SETUPFILE")
 	(let ((file (org-unbracket-string
-		     "\"" "\""
-		     (org-element-property :value k))))
-	  (and (not (file-remote-p file))
+			"\"" "\""
+		      (org-element-property :value k))))
+	  (and (not (org-file-url-p file))
+	       (not (file-remote-p file))
 	       (not (file-exists-p file))
 	       (list (org-element-property :begin k)
-		     (format "Non-existent setup file \"%s\"" file))))))))
+		     (format "Non-existent setup file %S" file))))))))
 
 (defun org-lint-wrong-include-link-parameter (ast)
   (org-element-map ast 'keyword

+ 3 - 0
testing/lisp/test-org-lint.el

@@ -240,6 +240,9 @@ This is not a node property
   "Test `org-lint-non-existent-setupfile-parameter' checker."
   (should
    (org-test-with-temp-text "#+setupfile: Idonotexist.org"
+     (org-lint '(non-existent-setupfile-parameter))))
+  (should-not
+   (org-test-with-temp-text "#+setupfile: https://I.do/not.exist.org"
      (org-lint '(non-existent-setupfile-parameter)))))
 
 (ert-deftest test-org-lint/wrong-include-link-parameter ()