From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yann Hodique Subject: [PATCH v2 06/11] org-taskjuggler: use project end date, if specified Date: Wed, 15 Aug 2012 21:11:52 +0200 Message-ID: <1345057917-69300-8-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]:39541) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1j11-0004nh-HN for emacs-orgmode@gnu.org; Wed, 15 Aug 2012 15:12:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T1j10-0002b3-8W for emacs-orgmode@gnu.org; Wed, 15 Aug 2012 15:12:27 -0400 Received: from mail-wi0-f177.google.com ([209.85.212.177]:55156) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1j10-0002an-1u for emacs-orgmode@gnu.org; Wed, 15 Aug 2012 15:12:26 -0400 Received: by wibhn17 with SMTP id hn17so1402754wib.12 for ; Wed, 15 Aug 2012 12:12:25 -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-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