From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Egli Subject: Re: [ANN] Exporter for taskjuggler Date: Mon, 19 Apr 2010 12:05:11 +0200 Message-ID: <87wrw3dag8.fsf@saadawi.sbszh.ch> References: <87ljdarxpw.fsf@saadawi.sbszh.ch> <874ojbgmi8.fsf@stats.ox.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O3nui-0006Ke-BH for emacs-orgmode@gnu.org; Mon, 19 Apr 2010 06:09:12 -0400 Received: from [140.186.70.92] (port=59719 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O3nug-0006H6-8b for emacs-orgmode@gnu.org; Mon, 19 Apr 2010 06:09:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O3nrX-00036d-DG for emacs-orgmode@gnu.org; Mon, 19 Apr 2010 06:06:00 -0400 Received: from mail.sbszh.ch ([217.162.18.84]:47917) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3nrW-00031Y-Vm for emacs-orgmode@gnu.org; Mon, 19 Apr 2010 06:05:55 -0400 In-Reply-To: <874ojbgmi8.fsf@stats.ox.ac.uk> (Dan Davison's message of "Fri, 16 Apr 2010 16:39:43 -0400") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Dan Davison Cc: emacs-orgmode@gnu.org Hi Dan Thanks for your feedback. Dan Davison writes: > A simple org file demonstrating some of the features is the most > important thing lacking at the moment. I'm working on an introduction on worg. Hopefully I'll have something by the end of this week including an example org file. =20 > I encountered problems with the fact that > > - I was using `org-odd-levels-only' Oh, OK, I'm not using this, so there might be issues there. > - the "allocate" property name is required to be lower case (unlike > Effort) That's a general problem. The exporter needs to map between org and tj terminology. In most cases this is not a problem as the terminology comes from tj, e.g. 'limits', 'vacation' or also 'allocate'. Here I assume that the property in org mode is named the same and capitalized the same as in tj. I guess this should be stated in the documentation. In other cases where the exporter needs to map between org and tj, e.g. for effort, but also for completeness or dependency information, the exporter is more forgiving. Specifically in the case of Effort it does the downcase as "Effort" is an established property on org. For completeness information it maps the TODO state (whether it is done or not). And dependencies are taken from the BLOCKER attribute (which is also semi-established). I don't know if this is a good solution. I just tried to stick to the tj property names as close as possible and only allow different names if those concepts and names are established in org mode under a different terminology. Hope that clears things up a bit. > - A Resource named with Uppercase letters will be expected to be all > lowercase by TJ (e.g. my Alf resource below). Well resource names in tj have to conform to [A=E2=80=93Za=E2=80=93z0=E2=80= =939_], so what I did in the exporter is look for an ID attribute in the resource or silently generate an id from the resource headline. So if do not specify an ID your resource Alf will be converted (and made unique) in `org-taskjuggler-get-unique-id'. I guess this is a bit behind the users back and also needs better documentation. In your case the resource will be downcased to 'alf'. I have resources like "Domain Expert", which will be converted to "domain_expert". That's why I usually add an ID property to resources so I can easily allocate them. > I've put patches corresponding to the hacks I made to solve these below. Thanks for the patches. More comments below. I have an updated version locally which also supports optional depends attributes like gapduration and gaplength (which were requested by T Helms on the list). I hope to publish this on a branch in the repo. > It would also be nice if repeated invocation of > org-export-as-taskjuggler-and-open on the same project didn't spawn > multiple TJ instances (TJ v2.4.3 ubuntu). Hm, yes. Good idea. Do you have an idea how this could be done easily in elisp? > I had a quick look at the TJ page -- it sounded as if the cross-platform > ruby version is advancing rapidly? Yes, I didn't even realize that a new version has come out as I'm still using the old C++ Unix-only version. > Make it work if `org-odd-levels-only' is in use: > > diff --git a/org-taskjuggler.el b/org-taskjuggler.el > index e887d33..e843dcd 100644 > --- a/org-taskjuggler.el > +++ b/org-taskjuggler.el > @@ -309,7 +309,7 @@ the current node such as the headline, the level, tod= o state > information, all the properties, etc." > (let* ((props (org-entry-properties)) > (components (org-heading-components)) > - (level (car components)) > + (level (nth 1 components)) > (headline (nth 4 components)) > (parent-ordered (org-taskjuggler-parent-is-ordered-p))) > (push (cons "level" level) props) Oh, OK, good catch. Does this also work if `org-odd-levels-only' is not in use? > Allow variations in capitalisation of allocate property name (or maybe > the documentation should just point out that it must be lowercase) I'd rather have the capitalisation as closely to the tj terminology as explained above. I'd prefer to update the documentation here. > Always output resource names lower case I guess this is also a documentation issue. If you know how resources will be named (either with an ID or with `org-taskjuggler-get-unique-id') then it should be more clear how to do the allocations. > More comprehensible error message if you forget to define a project... Yes, of course. I had fixed that one already locally. So, thanks again for the feedback. I hope to have the worg page and the code in the branch soon so things should become clearer. Thanks Christian --=20 Christian Egli Swiss Library for the Blind, Visually Impaired and Print Disabled Grubenstrasse 12, CH-8045 Z=C3=BCrich, Switzerland