taskjuggler export: take buffer local variables into account

* org-taskjuggler.el (org-export-as-taskjuggler): Clone the
buffer local variables to the temporary buffer before
exporting.

The taskjuggler exporter handles properties. When defining buffer
local priorities the export fails however, as buffer local variables
are not taken into account since the export happens in a new temporary
buffer. This commit fixes that by cloning the relevant buffer local
variables into the temporary buffer before exporting.
This commit is contained in:
Christian Egli 2011-09-07 15:45:14 +02:00
parent 09986fa395
commit 14304f6dcd
1 changed files with 2 additions and 0 deletions

View File

@ -277,6 +277,7 @@ defined in `org-export-taskjuggler-default-reports'."
(file-name-nondirectory buffer-file-name))
org-export-taskjuggler-extension)))
(buffer (find-file-noselect filename))
(old-buffer (current-buffer))
(org-export-taskjuggler-old-level 0)
task resource)
(unless tasks
@ -304,6 +305,7 @@ defined in `org-export-taskjuggler-default-reports'."
(setcar tasks (push (cons "version" version) task))))
(with-current-buffer buffer
(erase-buffer)
(org-clone-local-variables old-buffer "^org-")
(org-taskjuggler-open-project (car tasks))
(insert org-export-taskjuggler-default-global-properties)
(insert "\n")