From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yann Hodique Subject: [PATCH v3 06/11] org-taskjuggler.el: Use project end date, if specified Date: Thu, 16 Aug 2012 21:02:04 +0200 Message-ID: <1345143729-72705-7-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]:48576) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T25LC-0006c7-Sx for emacs-orgmode@gnu.org; Thu, 16 Aug 2012 15:02:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T25LB-0001qP-WE for emacs-orgmode@gnu.org; Thu, 16 Aug 2012 15:02:46 -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 1T25LB-0001oK-RF for emacs-orgmode@gnu.org; Thu, 16 Aug 2012 15:02:45 -0400 Received: by mail-we0-f169.google.com with SMTP id s10so2257402wey.0 for ; Thu, 16 Aug 2012 12:02:45 -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-taskjuggler-open-project): Use START - END as an alternative to START +Xd. --- lisp/org-taskjuggler.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el index c997da7..7376302 100644 --- a/lisp/org-taskjuggler.el +++ b/lisp/org-taskjuggler.el @@ -615,9 +615,11 @@ specified it is calculated (start (cdr (assoc "start" project))) (end (cdr (assoc "end" project)))) (insert - (format "project %s \"%s\" \"%s\" %s +%sd {\n }\n" + (format "project %s \"%s\" \"%s\" %s %s {\n }\n" unique-id headline version start - org-export-taskjuggler-default-project-duration)))) + (or (and end (format "- %s" end)) + (format "+%sd" + org-export-taskjuggler-default-project-duration)))))) (defun org-taskjuggler-filter-and-join (items) "Filter all nil elements from ITEMS and join the remaining ones -- 1.7.11.4