From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Egli Subject: Re: [BUG] ox-taskjuggler: unable to use depends {gapduration} Date: Wed, 05 Nov 2014 09:21:52 +0100 Message-ID: <871tpiys4f.fsf@sbs.ch> References: 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]:38007) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xlvr4-0005z3-Nm for emacs-orgmode@gnu.org; Wed, 05 Nov 2014 03:22:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xlvqx-0007R8-3q for emacs-orgmode@gnu.org; Wed, 05 Nov 2014 03:22:14 -0500 Received: from plane.gmane.org ([80.91.229.3]:43738) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xlvqw-0007Qv-S6 for emacs-orgmode@gnu.org; Wed, 05 Nov 2014 03:22:07 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Xlvqv-0001c9-L2 for emacs-orgmode@gnu.org; Wed, 05 Nov 2014 09:22:05 +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 ; Wed, 05 Nov 2014 09:22:05 +0100 Received: from christian.egli by alouette.sbs.ch with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 05 Nov 2014 09:22:05 +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 John Hendy writes: > I ran into an odd issue with a taskjuggler task tree I'm working on > when trying to apply a gapduration attribute to a task dependency. > Typically, I can just pass any valid taskjuggler attribute through > using properties, but my export was producing an error when trying to > use: > > :depends: task {gapduration 1h} > > Oddly, the output is as follows (task section): > > #+begin_src test.tjp > > task test "test" { > task task1 "task1" { > milestone > start 2014-11-05-08:00 > } > task task2 "task2" { > depends !task1 t :taskjuggl > duration 1h > } > #+end_src > > For some reason it's grabbing the taskjuggler tag! I tried with the > example in ox-taskjuggler.el with the same result. > > Is this a bug or am I mis-interpreting how this would work? No it is indeed a bug. At first I thought this was simply no longer working in the new exporter but I was wrong. Nicolas of course implemented it and way more. But there is a subtle bug. I actually found it because I wondered about the funny "t :taskjuggl" in the output. Here's the fix. diff --git a/contrib/lisp/ox-taskjuggler.el b/contrib/lisp/ox-taskjuggler.el index 807d702..9e977f6 100644 --- a/contrib/lisp/ox-taskjuggler.el +++ b/contrib/lisp/ox-taskjuggler.el @@ -600,7 +600,7 @@ doesn't include leading \"depends\"." (let ((id (org-element-property :TASK_ID dep))) (and id (string-match (concat id " +\\({.*?}\\)") dep-str) - (org-match-string-no-properties 1)))) + (org-match-string-no-properties 1 dep-str)))) path) ;; Compute number of exclamation marks by looking for the ;; common ancestor between TASK and DEP. Nicolas, I can push this myself but I haven't pushed to the repo in years. What is the current way? Do I just push to master? Thanks Christian -- Christian Egli Swiss Library for the Blind, Visually Impaired and Print Disabled Grubenstrasse 12, CH-8045 Zürich, Switzerland