From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yann Hodique Subject: [PATCH 02/10] org-taskjuggler: properly install local variables at export time Date: Sun, 5 Aug 2012 12:53:56 +0200 Message-ID: <1344164044-15059-3-git-send-email-yann.hodique@gmail.com> References: <1344164044-15059-1-git-send-email-yann.hodique@gmail.com> Return-path: Received: from eggs.gnu.org ([208.118.235.92]:56412) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SxyUH-0001Sz-IS for emacs-orgmode@gnu.org; Sun, 05 Aug 2012 06:55:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SxyUE-0000yj-9y for emacs-orgmode@gnu.org; Sun, 05 Aug 2012 06:55:09 -0400 Received: from mail-wg0-f49.google.com ([74.125.82.49]:40227) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SxyUE-0000yI-3P for emacs-orgmode@gnu.org; Sun, 05 Aug 2012 06:55:06 -0400 Received: by wgbez12 with SMTP id ez12so1367573wgb.30 for ; Sun, 05 Aug 2012 03:55:05 -0700 (PDT) In-Reply-To: <1344164044-15059-1-git-send-email-yann.hodique@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Cc: Yann Hodique * org-taskjuggler.el (org-export-as-taskjuggler): compute opt-plist, use `org-install-letbind' --- lisp/org-taskjuggler.el | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el index 3c56630..102eabc 100644 --- a/lisp/org-taskjuggler.el +++ b/lisp/org-taskjuggler.el @@ -284,7 +284,10 @@ defined in `org-export-taskjuggler-default-reports'." (message "Exporting...") (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-assign-task-ids (org-taskjuggler-compute-task-leafiness @@ -335,6 +338,14 @@ defined in `org-export-taskjuggler-default-reports'." (insert org-export-taskjuggler-default-global-properties) (insert "\n") (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)))) (org-taskjuggler-close-maybe level) (org-taskjuggler-open-resource resource) -- 1.7.11.3