From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yann Hodique Subject: [PATCH 06/10] org-taskjuggler: use project end date, if specified Date: Sun, 5 Aug 2012 12:54:00 +0200 Message-ID: <1344164044-15059-7-git-send-email-yann.hodique@gmail.com> References: <1344164044-15059-1-git-send-email-yann.hodique@gmail.com> Return-path: Received: from eggs.gnu.org ([208.118.235.92]:56475) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SxyUL-0001fM-RX for emacs-orgmode@gnu.org; Sun, 05 Aug 2012 06:55:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SxyUK-000114-UR for emacs-orgmode@gnu.org; Sun, 05 Aug 2012 06:55:13 -0400 Received: from mail-wi0-f177.google.com ([209.85.212.177]:58921) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SxyUK-0000uY-J8 for emacs-orgmode@gnu.org; Sun, 05 Aug 2012 06:55:12 -0400 Received: by mail-wi0-f177.google.com with SMTP id hm11so641660wib.12 for ; Sun, 05 Aug 2012 03:55:12 -0700 (PDT) In-Reply-To: <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-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 3f829b3..92ba79c 100644 --- a/lisp/org-taskjuggler.el +++ b/lisp/org-taskjuggler.el @@ -614,9 +614,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.3