From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yann Hodique Subject: [PATCH v2 02/11] org-taskjuggler: properly install local variables at export time Date: Wed, 15 Aug 2012 21:11:47 +0200 Message-ID: <1345057917-69300-3-git-send-email-yann.hodique@gmail.com> References: <1345057917-69300-1-git-send-email-yann.hodique@gmail.com> Return-path: Received: from eggs.gnu.org ([208.118.235.92]:39383) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1j0q-0004Gy-V4 for emacs-orgmode@gnu.org; Wed, 15 Aug 2012 15:12:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T1j0p-0002X0-Ri for emacs-orgmode@gnu.org; Wed, 15 Aug 2012 15:12:16 -0400 Received: from mail-wg0-f49.google.com ([74.125.82.49]:33637) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1j0p-0002Wn-Kz for emacs-orgmode@gnu.org; Wed, 15 Aug 2012 15:12:15 -0400 Received: by wgbez12 with SMTP id ez12so1350913wgb.30 for ; Wed, 15 Aug 2012 12:12:15 -0700 (PDT) In-Reply-To: <1345057917-69300-1-git-send-email-yann.hodique@gmail.com> In-Reply-To: <1344164044-15059-1-git-send-email-yann.hodique@gmail.com> References: <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 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