summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2021-04-09 22:49:54 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2021-04-09 22:49:54 +0200
commitf63bb5eea803e8202f748a246b6d4a6fb9df4706 (patch)
tree65406bd6600e5d5f9fad849b888e891c40eb7bb0
parent0457d8d5a3b0c1799ac7041023a13f640ccf4ea6 (diff)
parent71169144275f9c420c0b613429410af9e59f2ba9 (diff)
downloadorg-mode-f63bb5eea803e8202f748a246b6d4a6fb9df4706.tar.gz
Merge branch 'maint'
-rw-r--r--lisp/org-lint.el8
-rw-r--r--lisp/ox.el2
-rw-r--r--testing/lisp/test-org-lint.el3
3 files changed, 10 insertions, 3 deletions
diff --git a/lisp/org-lint.el b/lisp/org-lint.el
index e8b4eb4..1380f78 100644
--- a/lisp/org-lint.el
+++ b/lisp/org-lint.el
@@ -671,7 +671,7 @@ Use \"export %s\" instead"
(when (string= (org-element-property :key k) "OPTIONS")
(let ((value (org-element-property :value k))
(start 0))
- (while (string-match "\\(.+?\\):\\((.*?)\\|\\S-*\\)[ \t]*"
+ (while (string-match "\\(.+?\\):\\((.*?)\\|\\S-+\\)?[ \t]*"
value
start)
(setf start (match-end 0))
@@ -679,7 +679,11 @@ Use \"export %s\" instead"
(unless (member item allowed)
(push (list (org-element-property :post-affiliated k)
(format "Unknown OPTIONS item \"%s\"" item))
- reports))))))))
+ reports))
+ (unless (match-string 2 value)
+ (push (list (org-element-property :post-affiliated k)
+ (format "Missing value for option item %S" item))
+ reports))))))))
reports))
(defun org-lint-invalid-macro-argument-and-template (ast)
diff --git a/lisp/ox.el b/lisp/ox.el
index f705bc8..ff1f2ea 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -1386,7 +1386,7 @@ e.g., `org-export-create-backend'. It specifies which back-end
specific items to read, if any."
(let ((line
(let ((s 0) alist)
- (while (string-match "\\(.+?\\):\\((.*?)\\|\\S-*\\)[ \t]*" options s)
+ (while (string-match "\\(.+?\\):\\((.*?)\\|\\S-+\\)[ \t]*" options s)
(setq s (match-end 0))
(push (cons (match-string 1 options)
(read (match-string 2 options)))
diff --git a/testing/lisp/test-org-lint.el b/testing/lisp/test-org-lint.el
index 29bd942..800599e 100644
--- a/testing/lisp/test-org-lint.el
+++ b/testing/lisp/test-org-lint.el
@@ -313,6 +313,9 @@ This is not a node property
"Test `org-lint-unknown-options-item' checker."
(should
(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)))))
(ert-deftest test-org-lint/invalid-macro-argument-and-template ()