From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: taskjuggler (tj3) export issues and proposals Date: Wed, 1 Feb 2012 09:07:29 -0600 Message-ID: References: <871uqesl0u.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 ([140.186.70.92]:48592) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rsbma-0004rZ-Ur for emacs-orgmode@gnu.org; Wed, 01 Feb 2012 10:07:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RsbmU-0005Ci-B8 for emacs-orgmode@gnu.org; Wed, 01 Feb 2012 10:07:36 -0500 Received: from mail-ey0-f169.google.com ([209.85.215.169]:58856) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RsbmU-0005CD-0b for emacs-orgmode@gnu.org; Wed, 01 Feb 2012 10:07:30 -0500 Received: by eaag11 with SMTP id g11so641977eaa.0 for ; Wed, 01 Feb 2012 07:07:29 -0800 (PST) In-Reply-To: <871uqesl0u.fsf@sbs.ch> 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: Christian Egli Cc: emacs-orgmode@gnu.org On Wed, Feb 1, 2012 at 8:09 AM, Christian Egli wrot= e: > Hi John > > John Hendy writes: > >> Leading my first project and decided to dig into taskjuggler again. It >> just seems so natural to have everything in org if possible, so I took >> another look at the exporter, manual, and worg tutorial. [1][2] > > Cool. > First off, thanks for the input! >> As is, as far as I can tell, the exporter does not work out of the box >> with tj3. I /think/ I could get it to work if I added in a massive >> report definition (which now seems mandatory for tj3) under >> =3Dorg-export-taskjuggler-default-reports=3D, but that just feels clumsy= . > > First off let me say that I'm using the taskjuggler exporter with tj3, > so it should work. > This statement seems to indicate that org may work out of the box with tj3. > As far as I know setting the org-export-taskjuggler-default-reports > should work. As I agree that this is a bit clumsy and sets the reports > for all projects. I'm setting the variable in a file variable like so > (the compile-command is optional but you need to adapt it to match the > location of your tj3 binary and your file name): > > # Local Variables: > # org-export-taskjuggler-target-version: 3.0 > # org-export-taskjuggler-default-reports: ("include \"reports.tji\"") > # compile-command: "~/.gem/ruby/1.9.1/bin/tj3 yourfilename.tjp" > # End: > This seems to indicate that org does *not* work out of the box with tj3, but only if you use this tweak for the reports definitions. That's fine, I just want to be clear with whether org does or not work out of the box by just setting =3Dorg-export-taskjuggler-target-version: 3.x=3D I'm thinking it does not and you'll get a failed build with no output. And... sigh. I had never thought to define reports /as/ =3Dinclude "reports.tji=3D. How simple. > Then I define the reports in a separate file which is included similar > to the solution you outline below. > > I guess I should have some default report definitions for tj3 in the > exporter itself. The tj3 reports are quite massive and it is hard to > come by some which could be included in the Emacs source (you need > copyright assignments). Maybe the ones I have in my reports.tji could > qualify. Since these can vary, I actually think it would be fine to specify in the manual that you need a separate definition. But maybe a brand new tj user wouldn't like that? > >> For one, not every project will have the same report. Secondly, it >> seems odd to tweak report definitions through my .emacs file? > > Yes I agree, see above. > >> Based on my fiddling tonight, here are some suggestions/inquiries: >> >> 1) Could there be something equivalent to #+latex/#+begin_latex that >> would let me export some literal taskjuggler syntax into a file? >> Perhaps throw everything between a #+begin/end_taskjuggler just before >> the closing "}" for the task? > > I can see a use case for this with regards to reports. But what is the > use case if you'd place this inside tasks? The problem with literal > sections of taskjuggler is where to place them. Something might me > related to the project header, other stuff to the reports, etc. > Maybe that wasn't well thought out. I was thinking it could be useful, but I guess the primary use was for include reports.tji. >> 2) Could a different naming convention be used? It seems the currently >> it's either what is defined by the property :task_id: or defaults to >> the first word of the headline. If the default were more likely to be >> unique, it would spare having to define a ton of =3Dtask_id=3D propertie= s; >> instead one could define dependencies based on headline names because >> the syntax for naming was known and not likely to clash with another >> headline's ID. >> --- First word of the parent headline + "_" + first word of actual headl= ine? >> --- Bump it to the first two words of each headline? > > The exporter just makes the task_id locally unique. That's what tj > expects. From your usage I guess that you have a lot of tasks with the > same name (probably within different hierarchies). Both methods you > outline could be implemented. Which one is more general? > Maybe "parent_headline_task_headline"? But that gets tricking for: * Task Container ** Send product samples to X ** Send product samples to Y ** Send product samples to Z Append a number? My files are not [too] complex; perhaps the exporter should be done while thinking of how org might have worked for the Fedora tj example (http://www.taskjuggler.org/tj3/examples/Fedora-20/f-20.tjp). >> 3) As a piggyback on #1, I am successful with the following process: >> -- create reports.tji with my report definitions >> -- org-export-taskjuggler-default-reports set to nothing >> -- export from orgmode >> -- edit exported-file.tjp and add: include "reports.tji" to the end >> -- run =3Dtj3 filename.tjp=3D > > Could you not set org-export-taskjuggler-default-reports to "include > \"reports.tji\""? Otherwise you can use file variables as I outlined > above. Again. Yes. So simple. So overlooked by me... > >> Simply allowing the addition of =3Dinclude "reports.tji"=3D or even >> mandating that it exists would allow the use of tj3 with the current >> exporter. >> >> I don't know lisp and feel a bit guilty making potentially code-heavy >> suggestions about this... That said, I'm happy to pitch in with the >> manual/worg since they're a but outdated anyway. > > I'm happy to take you up on this offer. The worg page is a lot of work, > as it has all these screen shots. I'd be happy if you could update it > once you get all of this working. > I'm down and sounds good. >> I don't see an obvious place where one can even download tj 2.x.x >> anymore. > > I have it installed on an old machine. > Gotcha. >> The tj team seems to have left that version behind; perhaps >> the org exporter should to? > > I still prefer the old reports. But I guess yes, the exporter should > move on and support tj3 out of the box. The two main problems are > > 1. default reports with copyright assignments. As I include this in the > =C2=A0 Emacs source we need to have assignments. I can't just take the on= es > =C2=A0 from the tj3 manual (I'd have to ask the author first). > Gotcha. I started with the tj example and built my own... could I provide it without these issues? > 2. A way to invoke the view (as seamless as before). For tj 2.4 I was > =C2=A0 able to just invoke the taskjuggler gui with the exported tjp file= . > =C2=A0 For tj3 the exporter needs to somehow find out which reports are > =C2=A0 generated (HTML, text, csv) and then invoke the appropriate viewer= . > =C2=A0 This might be simplified I take some assumptions, but I haven't co= me > =C2=A0 up with a clever way to do this. I've never used csv or text... maybe org-export-taskjuggler-format-html/csv/text? And then something like =3Dorg-export-taskjuggler-default-export-format=3D? Default=3Dhtml but coul= d be changed with a file option? > > Thanks > Christian Thanks a ton for the response and effort. John > > -- > Christian Egli > Swiss Library for the Blind, Visually Impaired and Print Disabled > Grubenstrasse 12, CH-8045 Z=C3=BCrich, Switzerland > >