From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Guerry Subject: [Accepted] [O, 1/5] Add some minimal infrastructure to handle export to both tj2 and tj3 Date: Thu, 17 Mar 2011 09:44:59 +0100 (CET) Message-ID: <20110317084459.E9F076523@myhost.localdomain> References: <1300273502-12977-2-git-send-email-christian.egli@alumni.ethz.ch> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=38201 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q0ALK-0000tQ-0B for emacs-orgmode@gnu.org; Thu, 17 Mar 2011 06:22:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q0ALF-0005wq-Cp for emacs-orgmode@gnu.org; Thu, 17 Mar 2011 06:22:09 -0400 Received: from mail-wy0-f195.google.com ([74.125.82.195]:64585) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q0ALF-0005wj-6G for emacs-orgmode@gnu.org; Thu, 17 Mar 2011 06:22:05 -0400 Received: by wyb32 with SMTP id 32so473505wyb.6 for ; Thu, 17 Mar 2011 03:22:04 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Patch 691 (http://patchwork.newartisans.com/patch/691/) is now "Accepted". Maintainer comment: none This relates to the following submission: http://mid.gmane.org/%3C1300273502-12977-2-git-send-email-christian.egli%40alumni.ethz.ch%3E Here is the original message containing the patch: > Content-Type: text/plain; charset="utf-8" > MIME-Version: 1.0 > Content-Transfer-Encoding: 7bit > Subject: [O, > 1/5] Add some minimal infrastructure to handle export to both tj2 and > tj3 > Date: Wed, 16 Mar 2011 16:04:58 -0000 > From: Christian Egli > X-Patchwork-Id: 691 > Message-Id: <1300273502-12977-2-git-send-email-christian.egli@alumni.ethz.ch> > To: emacs-orgmode@gnu.org > > * org-taskjuggler.el (org-export-taskjuggler-target-version): > (org-taskjuggler-targeting-tj3-p): Add some minimal infrastructure to > handle export to both tj2 and tj3. > (org-taskjuggler-open-task): Use a different way to purge allocations > for tj2 and tj3. > > --- > lisp/org-taskjuggler.el | 14 +++++++++++++- > 1 files changed, 13 insertions(+), 1 deletions(-) > > diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el > index 8d6318e..ec6bb30 100644 > --- a/lisp/org-taskjuggler.el > +++ b/lisp/org-taskjuggler.el > @@ -181,6 +181,11 @@ resources for the project." > :group 'org-export-taskjuggler > :type 'string) > > +(defcustom org-export-taskjuggler-target-version 2.4 > + "Which version of TaskJuggler the exporter is targeting." > + :group 'org-export-taskjuggler > + :type 'number) > + > (defcustom org-export-taskjuggler-default-project-version "1.0" > "Default version string for the project." > :group 'org-export-taskjuggler > @@ -331,6 +336,10 @@ with the TaskJuggler GUI." > (command (concat process-name " " file-name))) > (start-process-shell-command process-name nil command))) > > +(defun org-taskjuggler-targeting-tj3-p () > + "Return true if we are targeting TaskJuggler III." > + (< org-export-taskjuggler-target-version 3.0)) > + > (defun org-taskjuggler-parent-is-ordered-p () > "Return true if the parent of the current node has a property > \"ORDERED\". Return nil otherwise." > @@ -623,7 +632,10 @@ org-mode priority string." > (if (and parent-ordered previous-sibling) > (format " depends %s\n" previous-sibling) > (and depends (format " depends %s\n" depends))) > - (and allocate (format " purge allocations\n allocate %s\n" allocate)) > + (and allocate (format " purge %s\n allocate %s\n" > + (or (and (org-taskjuggler-targeting-tj3-p) "allocations") > + "allocate") > + allocate)) > (and complete (format " complete %s\n" complete)) > (and effort (format " effort %s\n" effort)) > (and priority (format " priority %s\n" priority)) >