summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2020-05-19 20:29:33 -0400
committerKyle Meyer <kyle@kyleam.com>2020-05-19 20:33:15 -0400
commit962b8e765c2a73833f1d8d1da352f60ffb5e32f7 (patch)
treefcc70060d246c0ba678a419f8475475e3c17f428
parent9bc0cc7fb3285d9a1eb19bd4ce528e751240311e (diff)
downloadorg-mode-962b8e765c2a73833f1d8d1da352f60ffb5e32f7.tar.gz
org.el: Fix regression in collecting empty-value keywords
* lisp/org.el (org--collect-keywords-1): Don't replace space-only values with nil because that leads to the option's default being used. * testing/lisp/test-ox.el (test-org-export/get-inbuffer-options): Add test. This restores the behavior to what it was before b4e91b7e9 (New function: org-collect-keywords, 2020-04-26). Reported-by: Kaushal Modi <kaushal.modi@gmail.com> <CAFyQvY2ZGJPv=Ajx2_1xR0otv=VQYHcrUwzS46PmnyJ2Co1KVg@mail.gmail.com>
-rw-r--r--lisp/org.el1
-rw-r--r--testing/lisp/test-ox.el7
2 files changed, 6 insertions, 2 deletions
diff --git a/lisp/org.el b/lisp/org.el
index dcd4467..e577dc6 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -4523,7 +4523,6 @@ directory."
(push (cons keyword final) alist)
(setq keywords (remove keyword keywords))
(setq regexp (org-make-options-regexp keywords)))
- ((not (org-string-nw-p value)) nil)
((null entry) (push (list keyword final) alist))
(t (push final (cdr entry)))))))))))
alist)))
diff --git a/testing/lisp/test-ox.el b/testing/lisp/test-ox.el
index 8414227..92ccec0 100644
--- a/testing/lisp/test-ox.el
+++ b/testing/lisp/test-ox.el
@@ -280,7 +280,12 @@ num:2 <:active")))
(should-not
(equal "Mine"
(org-test-with-parsed-data "* COMMENT H1\n** H2\n#+EMAIL: Mine"
- (plist-get info :email)))))
+ (plist-get info :email))))
+ ;; Keywords can be set to an empty value.
+ (should-not
+ (let ((user-full-name "Me"))
+ (org-test-with-parsed-data "#+AUTHOR:"
+ (plist-get info :author)))))
(ert-deftest test-org-export/get-subtree-options ()
"Test setting options from headline's properties."