Merge branch 'maint'

This commit is contained in:
Nicolas Goaziou 2021-04-09 22:49:54 +02:00
commit f63bb5eea8
3 changed files with 10 additions and 3 deletions

View File

@ -671,7 +671,7 @@ Use \"export %s\" instead"
(when (string= (org-element-property :key k) "OPTIONS") (when (string= (org-element-property :key k) "OPTIONS")
(let ((value (org-element-property :value k)) (let ((value (org-element-property :value k))
(start 0)) (start 0))
(while (string-match "\\(.+?\\):\\((.*?)\\|\\S-*\\)[ \t]*" (while (string-match "\\(.+?\\):\\((.*?)\\|\\S-+\\)?[ \t]*"
value value
start) start)
(setf start (match-end 0)) (setf start (match-end 0))
@ -679,6 +679,10 @@ Use \"export %s\" instead"
(unless (member item allowed) (unless (member item allowed)
(push (list (org-element-property :post-affiliated k) (push (list (org-element-property :post-affiliated k)
(format "Unknown OPTIONS item \"%s\"" item)) (format "Unknown OPTIONS item \"%s\"" item))
reports))
(unless (match-string 2 value)
(push (list (org-element-property :post-affiliated k)
(format "Missing value for option item %S" item))
reports)))))))) reports))))))))
reports)) reports))

View File

@ -1386,7 +1386,7 @@ e.g., `org-export-create-backend'. It specifies which back-end
specific items to read, if any." specific items to read, if any."
(let ((line (let ((line
(let ((s 0) alist) (let ((s 0) alist)
(while (string-match "\\(.+?\\):\\((.*?)\\|\\S-*\\)[ \t]*" options s) (while (string-match "\\(.+?\\):\\((.*?)\\|\\S-+\\)[ \t]*" options s)
(setq s (match-end 0)) (setq s (match-end 0))
(push (cons (match-string 1 options) (push (cons (match-string 1 options)
(read (match-string 2 options))) (read (match-string 2 options)))

View File

@ -313,6 +313,9 @@ This is not a node property
"Test `org-lint-unknown-options-item' checker." "Test `org-lint-unknown-options-item' checker."
(should (should
(org-test-with-temp-text "#+options: foobarbaz:t" (org-test-with-temp-text "#+options: foobarbaz:t"
(org-lint '(unknown-options-item))))
(should
(org-test-with-temp-text "#+options: H:"
(org-lint '(unknown-options-item))))) (org-lint '(unknown-options-item)))))
(ert-deftest test-org-lint/invalid-macro-argument-and-template () (ert-deftest test-org-lint/invalid-macro-argument-and-template ()