From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yann Hodique Subject: [PATCH v3 02/11] org-taskjuggler.el: Properly install local variables at export time Date: Thu, 16 Aug 2012 21:02:00 +0200 Message-ID: <1345143729-72705-3-git-send-email-yann.hodique@gmail.com> References: <1345057917-69300-1-git-send-email-yann.hodique@gmail.com> <1345143729-72705-1-git-send-email-yann.hodique@gmail.com> Return-path: Received: from eggs.gnu.org ([208.118.235.92]:48541) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T25LA-0006WJ-Ph for emacs-orgmode@gnu.org; Thu, 16 Aug 2012 15:02:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T25L5-0001oP-L4 for emacs-orgmode@gnu.org; Thu, 16 Aug 2012 15:02:44 -0400 Received: from mail-we0-f169.google.com ([74.125.82.169]:54011) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T25L5-0001oK-EY for emacs-orgmode@gnu.org; Thu, 16 Aug 2012 15:02:39 -0400 Received: by weys10 with SMTP id s10so2257402wey.0 for ; Thu, 16 Aug 2012 12:02:38 -0700 (PDT) In-Reply-To: <1345143729-72705-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 7d9d203..529cda0 100644 --- a/lisp/org-taskjuggler.el +++ b/lisp/org-taskjuggler.el @@ -285,7 +285,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 @@ -336,6 +339,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.4