From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Lander Subject: Re: TaskJuggler3, revisited Date: Mon, 1 Nov 2010 22:05:52 -0400 Message-ID: <94AF83C1-39B7-449F-BCF5-F0CA3B3031EE@yahoo.com> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=42353 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PD6G6-0005k5-Fa for emacs-orgmode@gnu.org; Mon, 01 Nov 2010 22:06:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PD6G4-0004PN-1X for emacs-orgmode@gnu.org; Mon, 01 Nov 2010 22:05:58 -0400 Received: from smtp101.prem.mail.ac4.yahoo.com ([76.13.13.40]:29431) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1PD6G3-0004PD-S6 for emacs-orgmode@gnu.org; Mon, 01 Nov 2010 22:05:56 -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: emacs-orgmode Mode Cc: Christian Egli Hi everyone, Christian Egli and I have been having an off-list exchange about =20 making a TaskJuggler3 exporter. In fact, Christian would like to =20 change the current exporter to export to either TaskJuggler2 or =20 TaskJuggler3, depending on a defcustom! We have quite a number of =20 ideas in the pipeline now, and thought it would be best to move the =20 discussion, and access to the source code, back onto the list. Christian has set up a github repository with the changes he is making =20= here: http://github.com/egli/org-mode And the code I sent to Christian, which makes the exporter work with =20 TJ3, and also introduces some bug fixes and new features is here: = http://github.com/alander/org-taskjuggler3=20 . Please note that this is different from Christian's code, and that =20 he is the maintainer of the exporter that is part of org-mode. I =20 needed something to work, so I spent an afternoon hacking until it did =20= what I needed. If you are interested in the details, our e-mail exchange is =20 reproduced below. -Anthony ------------------------8<------------------------- From: christian.egli@sbs.ch Subject: Re: [Orgmode] Re: TaskJuggler 3, revisited Date: October 19, 2010 5:29:42 AM GMT-04:00 To: anthonylander@yahoo.com Cc: emacs-orgmode@gnu.org Hi Anthony Anthony Lander writes: > Please find attached a somewhat improved version of your TJ2 exporter, > a drop-in replacement that exports to TJ3, and also a sample .org > file. This is all exciting stuff. It's a little hard to digest (many changes rolled into one, white space formatting changes that make it hard to =20 find the real change, common lisp idioms which I'm not familiar with). Let me get back to you with some questions and then we can discuss how to most easily merge the stuff. - Why did you compute the leafiness? I seem to have experienced that tj3 has a problem with zero effort tasks that aren't marked as milestones. Is that the reason? - Why do you add a duration of 1d if the task has neither a duration, an end, a period nor an effort? Shouldn't that be a milestone instead? - I see that there is a need to annotate a project with stuff such as scenarios, etc and I was missing a way to have file specific reports or other globals. Your additional tags solve that problem. However I'm a bit reluctant to add more magic tags that mark the trees in some way. I was hoping to find a more general way for this problem. So far I haven't found a good solution though. - I like the idea of the TJ drawer, but in the end you just seem to use it for the project node and the globals node. So in essence they are taskjuggler source code blocks (in disguise) which are tied to a particular node. In fact they are not even really tied to a particular node, especially in the case of the globals. This goes back to the previous question about a good way to add file specific globals. Maybe some kind taskjuggler specific export option is really what we are looking for. As an aside, I think it's better to post the source code to the list. There might be other people interested in it and pitching in with opinions and improvements. Thanks --=20 Christian Egli Swiss Library for the Blind, Visually Impaired and Print Disabled Grubenstrasse 12, CH-8045 Z=FCrich, Switzerland ------------------------8<------------------------- From: anthonylander@yahoo.com Subject: Re: [Orgmode] Re: TaskJuggler 3, revisited Date: October 19, 2010 8:55:38 AM GMT-04:00 To: christian.egli@sbs.ch Hi Christian, On 10-Oct-19, at 5:29 AM, Christian Egli wrote: > This is all exciting stuff. It's a little hard to digest (many changes > rolled into one, white space formatting changes that make it hard to =20= > find > the real change, common lisp idioms which I'm not familiar with). =20 > Let me > get back to you with some questions and then we can discuss how to =20 > most > easily merge the stuff. Apologies for the big blob of changes - I was initially just trying to =20= get stuff to work, and, well, just kept going. As for the spacing/=20 formatting, I ran M-x indent-region RET on the whole file to get the =20 formatting consistent. I know it makes diffing hard, though :( Is the unfamiliar idiom the backtick list with the ,variables in it, =20 by chance? > - Why did you compute the leafiness? I seem to have experienced that =20= > tj3 > has a problem with zero effort tasks that aren't marked as milestones. > Is that the reason? > - Why do you add a duration of 1d if the task has neither a =20 > duration, an > end, a period nor an effort? Shouldn't that be a milestone instead? Ah, sorry. This I should have documented. The problem is that TJ3 =20 fails to compile the file if there is a leaf node with no computable =20 end date. TJ2 happily ignored the situation, but TJ3 throws an error. =20= So the problem I'm trying to solve is that as you are working on your =20= project plan, it won't compile unless you put in a bunch of dummy =20 estimates for the leaf nodes. I found it easier to let the exporter put them in, so that I don't =20 always think to myself, "did I put this in as a real estimate or just =20= to make the compiler happy?" Perhaps it would be better to change 1 =20 day to 1 minute or 1 second to make it very obviously a dummy duration =20= that is put in only to satisfy the compiler. And maybe even a comment =20= in the exported file, too. Also, I hadn't thought of milestones. I think the code needs a bit of =20= a fix because it needs to know that a milestone has zero effort, but =20 won't cause the compiler to fail. > - I see that there is a need to annotate a project with stuff such as > scenarios, etc and I was missing a way to have file specific reports > or other globals. Your additional tags solve that problem. However I'm > a bit reluctant to add more magic tags that mark the trees in some > way. I was hoping to find a more general way for this problem. So far > I haven't found a good solution though. I agree with you about the magic tags. I hate the feeling of =20 reimplementing the entire TJ3 file format in org. That's asking to =20 always be playing catch-up, and to always be missing features. I like =20= very much the idea of "borrowing" features from org that make sense, =20 and doing something useful on export. Examples are your % doneness of =20= a task, and your "ordered tasks in a hierarchy" ideas. And in fact I =20 added using the todo states and tags as flags so you can easily build =20= tj reports that reference them (see the "active" gantt chart, for =20 example). In the end, I felt the project needed a special marker because there =20 are specific TJ3 features that go with it. And also, the globals need =20= to go somewhere. I am also not thrilled with making all these tags, =20 but I didn't have a better solution either. In any event, the TJ drawer is my attempt at a catch-all solution. It =20= at least allows a user to use missing features without waiting for a =20 development change. So for example, I personally will never use the =20 accounting stuff, and would not be very motivated to add it to the =20 exporter, but if someone needed it, they could put the required code =20 in the TJ drawer, and they could still use the TJ exporter for their =20 project instead of having to abandon org-mode entirely for one missing =20= feature. > - I like the idea of the TJ drawer, but in the end you just seem to =20= > use > it for the project node and the globals node. So in essence they are > taskjuggler source code blocks (in disguise) which are tied to a > particular node. In fact they are not even really tied to a particular > node, especially in the case of the globals. This goes back to the > previous question about a good way to add file specific globals. Maybe > some kind taskjuggler specific export option is really what we are > looking for. Interesting thought. I very much like the idea that you can do other =20 things with your org-file than export it to taskjuggler. For example, =20= keep actual notes in the file, and export it to other formats like =20 html or LaTeX, for purposes other than project planning. Being able to =20= say "no, this is not a task" in the task tree would be very useful. I =20= don't know how to do it nicely either (yet). > As an aside, I think it's better to post the source code to the list. > There might be other people interested in it and pitching in with > opinions and improvements. That's a good idea. How about if we set up a git repository on github =20= with the files, and then post the link on the mailing list? I worry =20 that posting code and patches will badly confuse the patch manager =20 software than grabs code from the mailing list. Also, if we're going =20 to do that, I think we should put your email, and this reply to the =20 list as well. Your thoughts? All the best, -Anthony ------------------------8<------------------------- From: christian.egli@sbs.ch Subject: Re: [Orgmode] Re: TaskJuggler 3, revisited Date: October 28, 2010 3:28:13 AM GMT-04:00 To: anthonylander@yahoo.com Cc: emacs-orgmode@gnu.org Hi Anthony Anthony Lander writes: > Is the unfamiliar idiom the backtick list with the ,variables in it, > by chance? No it was more stuff like `return' and `return-from'. > Ah, sorry. This I should have documented. The problem is that TJ3 > fails to compile the file if there is a leaf node with no computable > end date. TJ2 happily ignored the situation, but TJ3 throws an error. OK, I understand. I managed to slowly integrate (some of) your changes. It should now generate milestones for nodes that cannot be scheduled and are leaf nodes. So basically it should export valid code for tj3 if you set org-export-taskjuggler-target-version to 3.0. Of course the report definitions in the defcustom org-export-taskjuggler-default-reports are not compatible with tj3 so you will need to change these. I have (or I guess rather had) some fondness for recursive functions, so I re-implemented your leafiness function recursively. However I ran into problems with max-lisp-eval-depth and it appears that recursion is not encouraged in Emacs lisp = (http://www.gnu.org/s/emacs/manual/html_node/elisp/Compilation-Tips.html#C= ompilation-Tips=20 ). So I guess it's back to iterative style. > In any event, the TJ drawer is my attempt at a catch-all solution. It > at least allows a user to use missing features without waiting for a > development change. So for example, I personally will never use the > accounting stuff, and would not be very motivated to add it to the > exporter, but if someone needed it, they could put the required code > in the TJ drawer, and they could still use the TJ exporter for their > project instead of having to abandon org-mode entirely for one missing > feature. I like the drawer stuff and will integrate it. > Interesting thought. I very much like the idea that you can do other > things with your org-file than export it to taskjuggler. For example, > keep actual notes in the file, and export it to other formats like > html or LaTeX, for purposes other than project planning. Absolutely, I agree. > Being able to say "no, this is not a task" in the task tree would be > very useful. I don't know how to do it nicely either (yet). Hm, no this is not possible right now. Why would you want to do this? Maybe we could just mark it as a comment and make the exporter honor comments. > How about if we set up a git repository on github > with the files, and then post the link on the mailing list? I set up a repo and pushed my changes to the code there (http://github.com/egli/org-mode). > I think we should put your email, and this reply to the > list as well. Yes, I almost forgot. Would you mind doing that? Thanks Christian --=20 Christian Egli Swiss Library for the Blind, Visually Impaired and Print Disabled Grubenstrasse 12, CH-8045 Z=FCrich, Switzerland ------------------------8<------------------------- From: anthonylander@yahoo.com Subject: Re: [Orgmode] Re: TaskJuggler 3, revisited Date: October 31, 2010 11:45:34 AM GMT-04:00 To: christian.egli@sbs.ch On 10-Oct-28, at 3:28 AM, Christian Egli wrote: > Anthony Lander writes: > >> Is the unfamiliar idiom the backtick list with the ,variables in it, >> by chance? > > No it was more stuff like `return' and `return-from'. I see. Well, once you were explicitly requiring 'cl.... :) And as you =20= discovered, without a tail-recursion optimizing compiler, recursive =20 functions are prohibitively expensive in elisp. Once you are =20 iterating, you need a way to exit iteration scopes before the end of =20 the iteration. > So basically it should export valid code for tj3 if you > set org-export-taskjuggler-target-version to 3.0. Of course the report > definitions in the defcustom org-export-taskjuggler-default-reports =20= > are > not compatible with tj3 so you will need to change these. Right. Or perhaps better, have different default reports for TJ2 or =20 TJ3, which the exporter selects as appropriate. >> Interesting thought. I very much like the idea that you can do other >> things with your org-file than export it to taskjuggler. For example, >> keep actual notes in the file, and export it to other formats like >> html or LaTeX, for purposes other than project planning. > > Absolutely, I agree. > >> Being able to say "no, this is not a task" in the task tree would be >> very useful. I don't know how to do it nicely either (yet). > > Hm, no this is not possible right now. Why would you want to do this? > Maybe we could just mark it as a comment and make the exporter honor > comments. Yes, marking it as a comment is not a bad idea. The reason I want to =20 do that goes with the idea of using the org file for additional =20 purposes than just a task tree. So for example, I would like to be =20 able to have nodes with meeting notes, or links to related files etc =20 etc under a task. That way I am only maintaining one project document, =20= not separate ones for notes, scheduling, etc. I think that is very =20 much in the spirit of org-mode, which so heavily emphasizes sparse =20 trees, agenda views etc as ways to tease out relevant information from =20= an intermingled file. >> How about if we set up a git repository on github >> with the files, and then post the link on the mailing list? > > I set up a repo and pushed my changes to the code there > (http://github.com/egli/org-mode). > >> I think we should put your email, and this reply to the >> list as well. > > Yes, I almost forgot. Would you mind doing that? I'll do that, yes. Best regards, -Anthony