diff --git a/contrib/lisp/org-export.el b/contrib/lisp/org-export.el index c9f0edca9..49d07e31c 100644 --- a/contrib/lisp/org-export.el +++ b/contrib/lisp/org-export.el @@ -1396,9 +1396,8 @@ for export. Return options as a plist." (unless (org-at-heading-p) (org-back-to-heading t)) ;; Take care of EXPORT_TITLE. If it isn't defined, use headline's ;; title as its fallback value. - (when (setq prop (progn (looking-at org-todo-line-regexp) - (or (save-match-data - (org-entry-get (point) "EXPORT_TITLE")) + (when (setq prop (or (org-entry-get (point) "EXPORT_TITLE") + (progn (looking-at org-todo-line-regexp) (org-match-string-no-properties 3)))) (setq plist (plist-put @@ -1426,11 +1425,15 @@ for export. Return options as a plist." (plist-put plist (car option) - ;; Parse VALUE if required. - (if (member property org-element-document-properties) - (org-element-parse-secondary-string - value (org-element-restriction 'keyword)) - value)))))))) + (cond + ;; Parse VALUE if required. + ((member property org-element-document-properties) + (org-element-parse-secondary-string + value (org-element-restriction 'keyword))) + ;; If BEHAVIOUR is `split' expected value is + ;; a list of strings, not a string. + ((eq (nth 4 option) 'split) (org-split-string value)) + (t value))))))))) ;; Also look for both general keywords and back-end specific ;; options if BACKEND is provided. (append (and backend (org-export-backend-options backend)) diff --git a/testing/lisp/test-org-export.el b/testing/lisp/test-org-export.el index 7eb9f990b..e049406c3 100644 --- a/testing/lisp/test-org-export.el +++ b/testing/lisp/test-org-export.el @@ -185,6 +185,32 @@ Paragraph" (forward-line) (should (equal (plist-get (org-export-get-environment nil t) :date) '("29-03-2012")))) + ;; Properties with `split' behaviour are stored as a list of + ;; strings. + (should + (equal '("a" "b") + (org-test-with-temp-text "#+EXCLUDE_TAGS: noexport +* Headline + :PROPERTIES: + :EXPORT_EXCLUDE_TAGS: a b + :END: +Paragraph" + (progn + (forward-line) + (plist-get (org-export-get-environment nil t) :exclude-tags))))) + ;; Handle :PROPERTY+: syntax. + (should + (equal '("a" "b") + (org-test-with-temp-text "#+EXCLUDE_TAGS: noexport +* Headline + :PROPERTIES: + :EXPORT_EXCLUDE_TAGS: a + :EXPORT_EXCLUDE_TAGS+: b + :END: +Paragraph" + (progn + (forward-line) + (plist-get (org-export-get-environment nil t) :exclude-tags))))) ;; Export properties are case-insensitive. (org-test-with-temp-text "* Headline :PROPERTIES: