1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-25 07:27:57 +00:00

org-export: Fix bug with default DATE value

* contrib/lisp/org-export.el (org-export-get-global-options): Parse
  default value from parsed keywords, too.
* testing/lisp/test-org-export.el: Change test accordingly.
This commit is contained in:
Nicolas Goaziou 2012-06-22 15:07:07 +02:00
parent 62453c5bf4
commit bafe0fb295
2 changed files with 18 additions and 5 deletions

View File

@ -1332,12 +1332,25 @@ process."
(and backend
(let ((var (intern
(format "org-%s-options-alist" backend))))
(and (boundp var) (eval var))))))
(and (boundp var) (symbol-value var))))))
;; Output value.
plist)
(mapc (lambda (cell)
(setq plist (plist-put plist (car cell) (eval (nth 3 cell)))))
all)
(mapc
(lambda (cell)
(setq plist
(plist-put
plist
(car cell)
;; Eval default value provided. If keyword is a member
;; of `org-element-parsed-keywords', parse it as
;; a secondary string before storing it.
(let ((value (eval (nth 3 cell))))
(if (not (stringp value)) value
(let ((keyword (nth 1 cell)))
(if (not (member keyword org-element-parsed-keywords)) value
(org-element-parse-secondary-string
value (org-element-restriction 'keyword)))))))))
all)
;; Return value.
plist))

View File

@ -107,7 +107,7 @@ already filled in `info'."
#+TITLE: with spaces"
(org-export-get-inbuffer-options))
'(:author
("Me, Myself and I") :creator "Idem" :date "Today"
("Me, Myself and I") :creator "Idem" :date ("Today")
:description "Testing\nwith two lines" :email "some@email.org"
:exclude-tags ("noexport" "invisible") :keywords "test" :language "en"
:select-tags ("export") :title ("Some title with spaces")))))