org-lint: don't complain about #+include URL

* lisp/org-lint.el (org-lint-wrong-include-link-parameter): When the
included file is a URL, skip the usual file checks.
This commit is contained in:
TEC 2022-06-05 22:28:39 +08:00
parent e3bf83fe82
commit ae168d5c8c
Signed by: tec
GPG key ID: 779591AFDB81F06C

View file

@ -663,6 +663,7 @@ in description"
path))) path)))
(search (and (not (equal file path)) (search (and (not (equal file path))
(org-string-nw-p (match-string 1 path))))) (org-string-nw-p (match-string 1 path)))))
(unless (org-url-p file)
(if (and file (if (and file
(not (file-remote-p file)) (not (file-remote-p file))
(not (file-exists-p file))) (not (file-exists-p file)))
@ -681,7 +682,7 @@ in description"
(format (format
"Invalid search part \"%s\" in INCLUDE keyword" "Invalid search part \"%s\" in INCLUDE keyword"
search)))) search))))
(unless visiting (kill-buffer buffer)))))))))))) (unless visiting (kill-buffer buffer)))))))))))))
(defun org-lint-obsolete-include-markup (ast) (defun org-lint-obsolete-include-markup (ast)
(let ((regexp (format "\\`\\(?:\".+\"\\|\\S-+\\)[ \t]+%s" (let ((regexp (format "\\`\\(?:\".+\"\\|\\S-+\\)[ \t]+%s"