From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Egli Subject: Re: [bug] ox-taskjuggler Date: Mon, 26 Jan 2015 13:30:04 +0100 Message-ID: <874mrdsp0z.fsf@sbs.ch> References: <87iog1xj52.fsf@nicolasgoaziou.fr> <87d267ru9c.fsf@sbs.ch> <878ugtswhg.fsf@sbs.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58936) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFio8-0002rF-5T for emacs-orgmode@gnu.org; Mon, 26 Jan 2015 07:30:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YFio4-0001yK-3H for emacs-orgmode@gnu.org; Mon, 26 Jan 2015 07:30:20 -0500 Received: from plane.gmane.org ([80.91.229.3]:57930) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFio3-0001xr-Sb for emacs-orgmode@gnu.org; Mon, 26 Jan 2015 07:30:16 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YFio2-0004nc-Al for emacs-orgmode@gnu.org; Mon, 26 Jan 2015 13:30:14 +0100 Received: from alouette.sbs.ch ([194.29.12.218]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 26 Jan 2015 13:30:14 +0100 Received: from christian.egli by alouette.sbs.ch with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 26 Jan 2015 13:30:14 +0100 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 Søren Mikkelsen writes: > On 2015-01-23 09:59, Christian Egli wrote: >> Søren Mikkelsen writes: >> >>> It works, but only for tasks that aren't having a start >>> attribute. It is possible to give a warning if the start >>> attribute already exists and make the default one, the one >>> specified in the attributes (drawer)? >> >> What exactly doesn't work? Are there two start entries in the task? >> One because of the SCHEDULED property and one because of the the >> start property? >> >> Then you might have to remove the start property from >> org-taskjuggler-valid-task-attributes before adding the other >> valid attributes i.e. >> >> ;; Add other valid attributes. (org-taskjuggler--indent-string >> (org-taskjuggler--build-attributes task >> org-taskjuggler-valid-task-attributes)) >> >> Might have to become (untested) >> >> ;; Add other valid attributes. (org-taskjuggler--indent-string >> (org-taskjuggler--build-attributes task (remq 'start >> org-taskjuggler-valid-task-attributes))) >> >> HTH Christian >> > The problem by removing the start attribute is that it destroys the > backward compatibility. I want ox-taskjuggler to accept both methods, > where the start property attribute overrules the scheduled attribute, > if this is present. I don't understand. You get the start of a task using org-taskjuggler-get-start. This can be either the start attribute or the SCHEDULED attribute. Then you insert this in the task if it is non-nil. Since you have dealt with this attribute already you don't need to handle it in org-taskjuggler--build-attributes. Hence you remove it (just for this call) from the list of task attributes that need to be handled. HTH Christian -- Christian Egli Swiss Library for the Blind, Visually Impaired and Print Disabled Grubenstrasse 12, CH-8045 Zürich, Switzerland