Søren Mikkelsen <so...@aamikkelsen.dk> writes: > On 2015-01-23 09:59, Christian Egli wrote: >> Søren Mikkelsen <so...@aamikkelsen.dk> 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