org-taskjuggler.el: Properly install local variables at export time

* org-taskjuggler.el (org-export-as-taskjuggler): Compute opt-plist, use
`org-install-letbind'.
This commit is contained in:
Yann Hodique 2012-08-16 21:02:00 +02:00 committed by Bastien Guerry
parent b183bd1d07
commit b711e70ed8
1 changed files with 12 additions and 1 deletions

View File

@ -285,7 +285,10 @@ defined in `org-export-taskjuggler-default-reports'."
(message "Exporting...") (message "Exporting...")
(setq-default org-done-keywords org-done-keywords) (setq-default org-done-keywords org-done-keywords)
(let* ((tasks (let* ((opt-plist (org-combine-plists (org-default-export-plist)
(org-infile-export-plist)))
(org-export-opt-plist opt-plist)
(tasks
(org-taskjuggler-resolve-dependencies (org-taskjuggler-resolve-dependencies
(org-taskjuggler-assign-task-ids (org-taskjuggler-assign-task-ids
(org-taskjuggler-compute-task-leafiness (org-taskjuggler-compute-task-leafiness
@ -336,6 +339,14 @@ defined in `org-export-taskjuggler-default-reports'."
(insert org-export-taskjuggler-default-global-properties) (insert org-export-taskjuggler-default-global-properties)
(insert "\n") (insert "\n")
(dolist (resource resources) (dolist (resource resources)
(org-install-letbind)
;; create local variables for all options, to make sure all called
;; functions get the correct information
(mapc (lambda (x)
(set (make-local-variable (nth 2 x))
(plist-get opt-plist (car x))))
org-export-plist-vars)
(let ((level (cdr (assoc "level" resource)))) (let ((level (cdr (assoc "level" resource))))
(org-taskjuggler-close-maybe level) (org-taskjuggler-close-maybe level)
(org-taskjuggler-open-resource resource) (org-taskjuggler-open-resource resource)