From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Egli Subject: [PATCH 2/3] Taskjuggler export: Only create a milestone if node has no children Date: Fri, 08 Mar 2013 17:24:57 +0100 Message-ID: <878v5xg8py.fsf@sbs.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:44222) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UE06S-0001Ck-Iy for emacs-orgmode@gnu.org; Fri, 08 Mar 2013 11:25:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UE06N-0007Gg-FJ for emacs-orgmode@gnu.org; Fri, 08 Mar 2013 11:25:04 -0500 Received: from mail01.sbs.ch ([194.29.15.69]:44962) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UE06N-0007Er-9b for emacs-orgmode@gnu.org; Fri, 08 Mar 2013 11:24:59 -0500 Received: from localhost (localhost [127.0.0.1]) by mail01.sbs.ch (Postfix) with ESMTP id CCC38A5E for ; Fri, 8 Mar 2013 17:24:58 +0100 (CET) Received: from mail01.sbs.ch ([127.0.0.1]) by localhost (mail01.sbs.ch [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ALIBkbjrZR7Z for ; Fri, 8 Mar 2013 17:24:58 +0100 (CET) Received: from s05.sbszh.ch (s05.sbszh.ch [10.0.9.9]) by mail01.sbs.ch (Postfix) with ESMTP id 621ACA5E for ; Fri, 8 Mar 2013 17:24:58 +0100 (CET) Received: from localhost (unknown [127.0.0.1]) by localhost.sbszh.ch (Postfix) with ESMTP id 49C7467F45A for ; Fri, 8 Mar 2013 17:24:58 +0100 (CET) Received: from s05.sbszh.ch ([127.0.0.1]) by localhost (s05.sbszh.ch [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 03735-09 for ; Fri, 8 Mar 2013 17:24:57 +0100 (CET) Received: from wharton (w302.sbszh.ch [10.0.41.2]) by s05.sbszh.ch (Postfix) with ESMTP id 8944667F44F for ; Fri, 8 Mar 2013 17:24:57 +0100 (CET) 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 * contrib/lisp/ox-taskjuggler.el (org-taskjuggler--build-task): Fix the check whether a node has no children A milestone should only (automatically) be inserted if a node has no children and no duration defined. --- contrib/lisp/ox-taskjuggler.el | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/contrib/lisp/ox-taskjuggler.el b/contrib/lisp/ox-taskjuggler.el index 88641b8..9146dfd 100644 --- a/contrib/lisp/ox-taskjuggler.el +++ b/contrib/lisp/ox-taskjuggler.el @@ -696,14 +696,14 @@ a unique id will be associated to it." (effort (org-element-property :EFFORT task)) (milestone (or (org-element-property :MILESTONE task) - (and (org-element-map (org-element-contents task) 'headline - 'identity info t) ; Has task any child? - (not (or effort - (org-element-property :LENGTH task) - (org-element-property :DURATION task) - (and (org-taskjuggler-get-start task) - (org-taskjuggler-get-end task)) - (org-element-property :PERIOD task)))))) + (not (or (org-element-map (org-element-contents task) 'headl= ine + 'identity info t) ; Has task any child? + effort + (org-element-property :LENGTH task) + (org-element-property :DURATION task) + (and (org-taskjuggler-get-start task) + (org-taskjuggler-get-end task)) + (org-element-property :PERIOD task))))) (priority (let ((pri (org-element-property :priority task))) (and pri --=20 1.7.10.4 --=20 Christian Egli Swiss Library for the Blind, Visually Impaired and Print Disabled Grubenstrasse 12, CH-8045 Z=C3=BCrich, Switzerland ----- Die neue Online-Bibliothek der SBS: Mit wenigen Klicks zum Buch unter http://online.sbs.ch