Hi all Here are some more small fixes to taskjuggler export Thanks Christian Egli (3): Replace recursive implementation with an iterative one Fix allocations handling for tj3 Fix a typo in the commentary. lisp/org-taskjuggler.el | 22 ++++++++++------------ 1 files changed, 10 insertions(+), 12 deletions(-)
From: Christian Egli <christian.egli@sbszh.ch> * org-taskjuggler.el (org-taskjuggler-assign-resource-ids): Replace recursive implementation with an iterative one. That way we can avoid to have ask users to increase `max-lisp-eval-depth'. --- lisp/org-taskjuggler.el | 16 +++++++--------- 1 files changed, 7 insertions(+), 9 deletions(-) diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el index 9c88f5d..279f46d 100644 --- a/lisp/org-taskjuggler.el +++ b/lisp/org-taskjuggler.el @@ -418,15 +418,13 @@ deeper), then it's not a leaf." (defun org-taskjuggler-assign-resource-ids (resources) "Given a list of resources return the same list, assigning a unique id to each resource." - (cond - ((null resources) nil) - (t - (let* ((resource (car resources)) - (unique-id (org-taskjuggler-get-unique-id resource unique-ids))) - (push (cons "unique-id" unique-id) resource) - (cons resource - (org-taskjuggler-assign-resource-ids (cdr resources) - (cons unique-id unique-ids))))))) + (let (unique-ids new-list) + (dolist (resource resources new-list) + (let ((unique-id (org-taskjuggler-get-unique-id resource unique-ids))) + (push (cons "unique-id" unique-id) resource) + (push unique-id unique-ids) + (push resource new-list))) + (nreverse new-list))) (defun org-taskjuggler-resolve-dependencies (tasks) (let ((previous-level 0) -- 1.7.1
From: Christian Egli <christian.egli@sbszh.ch> * org-taskjuggler.el (org-taskjuggler-open-task): Only emit a "purge allocations" statement if we are not targeting tj3. --- lisp/org-taskjuggler.el | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el index 279f46d..bcf2c45 100644 --- a/lisp/org-taskjuggler.el +++ b/lisp/org-taskjuggler.el @@ -660,8 +660,8 @@ org-mode priority string." (format " depends %s\n" previous-sibling) (and depends (format " depends %s\n" depends))) (and allocate (format " purge %s\n allocate %s\n" - (or (and (org-taskjuggler-targeting-tj3-p) "allocations") - "allocate") + (or (and (org-taskjuggler-targeting-tj3-p) "allocate") + "allocations") allocate)) (and complete (format " complete %s\n" complete)) (and effort (format " effort %s\n" effort)) -- 1.7.1
From: Christian Egli <christian.egli@sbszh.ch> * org-taskjuggler.el: Fix a typo in the commentary. --- lisp/org-taskjuggler.el | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el index bcf2c45..f891634 100644 --- a/lisp/org-taskjuggler.el +++ b/lisp/org-taskjuggler.el @@ -144,7 +144,7 @@ ;; - Look at org-file-properties, org-global-properties and ;; org-global-properties-fixed ;; - What about property inheritance and org-property-inherit-p? -;; - Use TYP_TODO as an way to assign resources +;; - Use TYPE_TODO as an way to assign resources ;; - Make sure multiple dependency definitions (i.e. BLOCKER on ;; previous-sibling and on a specific task_id) in multiple ;; attributes are properly exported. -- 1.7.1
Patch 707 (http://patchwork.newartisans.com/patch/707/) is now "Accepted". Maintainer comment: none This relates to the following submission: http://mid.gmane.org/%3C1300720268-9375-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/3] Replace recursive implementation with an iterative one > Date: Mon, 21 Mar 2011 20:11:06 -0000 > From: Christian Egli <christian.egli@alumni.ethz.ch> > X-Patchwork-Id: 707 > Message-Id: <1300720268-9375-2-git-send-email-christian.egli@alumni.ethz.ch> > To: emacs-orgmode@gnu.org > Cc: Christian Egli <christian.egli@sbszh.ch> > > From: Christian Egli <christian.egli@sbszh.ch> > > * org-taskjuggler.el (org-taskjuggler-assign-resource-ids): Replace > recursive implementation with an iterative one. > > That way we can avoid to have ask users to increase > `max-lisp-eval-depth'. > > --- > lisp/org-taskjuggler.el | 16 +++++++--------- > 1 files changed, 7 insertions(+), 9 deletions(-) > > diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el > index 9c88f5d..279f46d 100644 > --- a/lisp/org-taskjuggler.el > +++ b/lisp/org-taskjuggler.el > @@ -418,15 +418,13 @@ deeper), then it's not a leaf." > (defun org-taskjuggler-assign-resource-ids (resources) > "Given a list of resources return the same list, assigning a > unique id to each resource." > - (cond > - ((null resources) nil) > - (t > - (let* ((resource (car resources)) > - (unique-id (org-taskjuggler-get-unique-id resource unique-ids))) > - (push (cons "unique-id" unique-id) resource) > - (cons resource > - (org-taskjuggler-assign-resource-ids (cdr resources) > - (cons unique-id unique-ids))))))) > + (let (unique-ids new-list) > + (dolist (resource resources new-list) > + (let ((unique-id (org-taskjuggler-get-unique-id resource unique-ids))) > + (push (cons "unique-id" unique-id) resource) > + (push unique-id unique-ids) > + (push resource new-list))) > + (nreverse new-list))) > > (defun org-taskjuggler-resolve-dependencies (tasks) > (let ((previous-level 0) >
Patch 707 (http://patchwork.newartisans.com/patch/707/) is now "Accepted". Maintainer comment: none This relates to the following submission: http://mid.gmane.org/%3C1300720268-9375-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/3] Replace recursive implementation with an iterative one > Date: Mon, 21 Mar 2011 20:11:06 -0000 > From: Christian Egli <christian.egli@alumni.ethz.ch> > X-Patchwork-Id: 707 > Message-Id: <1300720268-9375-2-git-send-email-christian.egli@alumni.ethz.ch> > To: emacs-orgmode@gnu.org > Cc: Christian Egli <christian.egli@sbszh.ch> > > From: Christian Egli <christian.egli@sbszh.ch> > > * org-taskjuggler.el (org-taskjuggler-assign-resource-ids): Replace > recursive implementation with an iterative one. > > That way we can avoid to have ask users to increase > `max-lisp-eval-depth'. > > --- > lisp/org-taskjuggler.el | 16 +++++++--------- > 1 files changed, 7 insertions(+), 9 deletions(-) > > diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el > index 9c88f5d..279f46d 100644 > --- a/lisp/org-taskjuggler.el > +++ b/lisp/org-taskjuggler.el > @@ -418,15 +418,13 @@ deeper), then it's not a leaf." > (defun org-taskjuggler-assign-resource-ids (resources) > "Given a list of resources return the same list, assigning a > unique id to each resource." > - (cond > - ((null resources) nil) > - (t > - (let* ((resource (car resources)) > - (unique-id (org-taskjuggler-get-unique-id resource unique-ids))) > - (push (cons "unique-id" unique-id) resource) > - (cons resource > - (org-taskjuggler-assign-resource-ids (cdr resources) > - (cons unique-id unique-ids))))))) > + (let (unique-ids new-list) > + (dolist (resource resources new-list) > + (let ((unique-id (org-taskjuggler-get-unique-id resource unique-ids))) > + (push (cons "unique-id" unique-id) resource) > + (push unique-id unique-ids) > + (push resource new-list))) > + (nreverse new-list))) > > (defun org-taskjuggler-resolve-dependencies (tasks) > (let ((previous-level 0) >
Patch 708 (http://patchwork.newartisans.com/patch/708/) is now "Accepted". Maintainer comment: none This relates to the following submission: http://mid.gmane.org/%3C1300720268-9375-3-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,2/3] Fix allocations handling for tj3 > Date: Mon, 21 Mar 2011 20:11:07 -0000 > From: Christian Egli <christian.egli@alumni.ethz.ch> > X-Patchwork-Id: 708 > Message-Id: <1300720268-9375-3-git-send-email-christian.egli@alumni.ethz.ch> > To: emacs-orgmode@gnu.org > Cc: Christian Egli <christian.egli@sbszh.ch> > > From: Christian Egli <christian.egli@sbszh.ch> > > * org-taskjuggler.el (org-taskjuggler-open-task): Only emit a "purge > allocations" statement if we are not targeting tj3. > > --- > lisp/org-taskjuggler.el | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el > index 279f46d..bcf2c45 100644 > --- a/lisp/org-taskjuggler.el > +++ b/lisp/org-taskjuggler.el > @@ -660,8 +660,8 @@ org-mode priority string." > (format " depends %s\n" previous-sibling) > (and depends (format " depends %s\n" depends))) > (and allocate (format " purge %s\n allocate %s\n" > - (or (and (org-taskjuggler-targeting-tj3-p) "allocations") > - "allocate") > + (or (and (org-taskjuggler-targeting-tj3-p) "allocate") > + "allocations") > allocate)) > (and complete (format " complete %s\n" complete)) > (and effort (format " effort %s\n" effort)) >
Patch 706 (http://patchwork.newartisans.com/patch/706/) is now "Accepted". Maintainer comment: none This relates to the following submission: http://mid.gmane.org/%3C1300720268-9375-4-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,3/3] Fix a typo in the commentary. > Date: Mon, 21 Mar 2011 20:11:08 -0000 > From: Christian Egli <christian.egli@alumni.ethz.ch> > X-Patchwork-Id: 706 > Message-Id: <1300720268-9375-4-git-send-email-christian.egli@alumni.ethz.ch> > To: emacs-orgmode@gnu.org > Cc: Christian Egli <christian.egli@sbszh.ch> > > From: Christian Egli <christian.egli@sbszh.ch> > > * org-taskjuggler.el: Fix a typo in the commentary. > > --- > lisp/org-taskjuggler.el | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el > index bcf2c45..f891634 100644 > --- a/lisp/org-taskjuggler.el > +++ b/lisp/org-taskjuggler.el > @@ -144,7 +144,7 @@ > ;; - Look at org-file-properties, org-global-properties and > ;; org-global-properties-fixed > ;; - What about property inheritance and org-property-inherit-p? > -;; - Use TYP_TODO as an way to assign resources > +;; - Use TYPE_TODO as an way to assign resources > ;; - Make sure multiple dependency definitions (i.e. BLOCKER on > ;; previous-sibling and on a specific task_id) in multiple > ;; attributes are properly exported. >
Hi Christian,
Christian Egli <christian.egli@alumni.ethz.ch> writes:
> Here are some more small fixes to taskjuggler export
I've applied them -- thanks!
--
Bastien