From mboxrd@z Thu Jan 1 00:00:00 1970 From: Baptiste Subject: Re: ox-taskjuggler : Correct a small typo and deal with Scheduled and deadline in task Date: Mon, 22 Apr 2013 11:20:57 +0200 Message-ID: <87r4i33p5h.fsf@bat.fr.eu.org> References: <874nf24g0n.fsf@bat.fr.eu.org> <87fvyjzlde.fsf@sbs.ch> <87obd7h6re.fsf@bzg.ath.cx> <877gjvvwni.fsf@sbs.ch> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:44661) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUBzu-0003Q2-GM for emacs-orgmode@gnu.org; Mon, 22 Apr 2013 04:21:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UUBzr-0004ct-F4 for emacs-orgmode@gnu.org; Mon, 22 Apr 2013 04:21:14 -0400 Received: from mail-wi0-x22c.google.com ([2a00:1450:400c:c05::22c]:38526) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUBzq-0004Ys-8P for emacs-orgmode@gnu.org; Mon, 22 Apr 2013 04:21:11 -0400 Received: by mail-wi0-f172.google.com with SMTP id hm14so655616wib.17 for ; Mon, 22 Apr 2013 01:21:08 -0700 (PDT) In-Reply-To: <877gjvvwni.fsf@sbs.ch> (Christian Egli's message of "Mon, 22 Apr 2013 09:42:41 +0200") 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: Org Mode dev list --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Hi, you will find hereafter the patch after the little cleanup. BTW, there is a way (by code reading, not tested) to force a milestone with both start and end : if I am not wrong, you may use a :milestone property of an org-entry to create a milestone task. Not to say that it is not advised to both use :start properties and :SCHEDULED mechanism in an org entry (you would end with two /start/ elements in tj3). *Le lun., avril 22 2013, Christian Egli a écrit* Bastien writes: > Hi Baptiste and Christian, > > Christian Egli writes: > >> This looks a bit fishy. Shouldn't this be >> >> ((start) (format " start %s\n" start)) > > I guess this should be > > (start (format " start %s\n" start)) Doh, yes of course. -- : ~^v^~ Bat --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-ox-taskjuggler.el-use-SCHEDULED-and-DEADLINE-as-star.patch >From d36be8faf6ecbc722d75950f5bc664f2b9d87e27 Mon Sep 17 00:00:00 2001 From: Baptiste Fouques Date: Mon, 22 Apr 2013 10:59:15 +0200 Subject: [PATCH] ox-taskjuggler.el: use :SCHEDULED and :DEADLINE as start and end for tasks as a special behavior, for milestones, if both :SCHEDULED and :DEADLINE ar specified, then :SCHEDULED will be mark as the milestone date, and :DEADLINE will be checked against actual scheduled date by TJ3. TINYCHANGE --- contrib/lisp/ox-taskjuggler.el | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/contrib/lisp/ox-taskjuggler.el b/contrib/lisp/ox-taskjuggler.el index 4724ec3..2c1dee7 100644 --- a/contrib/lisp/ox-taskjuggler.el +++ b/contrib/lisp/ox-taskjuggler.el @@ -754,6 +754,8 @@ a unique id will be associated to it." (org-element-property :COMPLETE task))) (depends (org-taskjuggler-resolve-dependencies task info)) (effort (org-element-property :EFFORT task)) + (start (org-taskjuggler-get-start task)) + (end (org-taskjuggler-get-end task)) (milestone (or (org-element-property :MILESTONE task) (not (or (org-element-map (org-element-contents task) 'headline @@ -775,6 +777,14 @@ a unique id will be associated to it." (org-taskjuggler-get-id task info) (org-taskjuggler-get-name task)) ;; Add default attributes. + (and milestone + (cond + ((and start end) (format " start %s\n maxend %s\n" start end)) + (start (format " start %s\n" start)) + (end (format " start %s\n" end)))) + (and start (not milestone) (format " start %s\n" start)) + (and end (not milestone) (format " end %s\n" end)) + (and depends (format " depends %s\n" (org-taskjuggler-format-dependencies depends task info))) -- 1.8.1.2 --=-=-=--